A negative value for svg attribute <width> is not allowed

jay picture jay · Sep 13, 2011 · Viewed 9.9k times · Source

I am trying to draw two google treemaps and keep them in tabs and am getting the error:

A negative value for svg attribute <width> is not allowed

Only one of the treemaps is visible. I am assuming the other one is not able to finish drawing. There is no other description of the error in the console. (Google chrome).

My code: http://jsfiddle.net/tTqjr/

Answer

jay picture jay · Sep 15, 2011

Solved the problem. The div element on which Google Annotated timeline was being created had display:none property. Just made sure that display:none is changed to display:block before calling the draw function.