Negative svg <width> attribute value not allowed

I try to draw two google tracks and keep them in tabs and I get an error:

Negative value of svg <width> attribute is not allowed

Only one of the treemaps is displayed. I assume that the other will not be able to finish drawing. There is no other description of the error in the console. (Google Chrome).

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

+4
source share
3 answers

Solved a problem. The div element on which the Google Annotated timeline was created has the display:none property. Just make sure display:none changed to display:block before calling the draw function.

+10
source

I wrapped my two divs in a rowrap / col pair to solve and drag them using the hide () / show () / toggle () keys.

Of

 <div class="row"> <div class="col-md-12" id="chart_div"> </div> </div> <div class="row"> <div class="col-md-12" id="chart_div2"> </div> </div> 

in

 <div class="row"> <div class="col-md-12"> <div id="chart_div"> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div id="chart_div2"> </div> </div> </div> 
+2
source

Estimate that this is not a problem with the OP, but I had the same error and setting display: block; it didn't matter to me, but I had a padding-top: 50px; in the div for the chart and deleting this resolved question for me!

+1
source

All Articles