You need to unhide the chart div prior to drawing the chart, then hide it
again when the chart is finished drawing:
var bubbleChart = new google.visualization.BubbleChart($('bubble_div')[0]);
$('bubble_div').show();
google.visualization.events.addListener(bubbleChart, 'ready', function () {
$('bubble_div').hide();
});
bubbleChart.draw(data, {/*options*/});
On Thursday, July 5, 2012 5:23:22 AM UTC-4, Raizer wrote:
>
> Hi all,
> first of all sorry for my English but i'm Italian.
>
> Now... i have several chart displayed on my page (all
> html5+javascript+jquery), some are hidden (display: none) and other not. If
> i hide motion chart or geochart everything work flawless, but if i use this
> tag on bubblechart the graph "forget" his dimension, resulting in a 400x200
> stamp.
> This is the code i use regularly with other chart.
>
> <div style="width: 100%; clear: left; display: none;"
> id="internet-frame">
> <div style="width: 50%; float: left ; text-align: center; ">
> <div id="internet-bubble" style="width: 650px; height:
> 360px;margin: 0 auto "></div>
> </div>
> </div>
>
> this is what i use with bubblechart
>
> <div style="height: 900px;display: none" id="bubble-frame">
> <div id="chart_div" style="width: 900px; height: 400px;"></div>
> </div>
>
> if i use this snippet of code instead (without hiding it)
> <div id="chart_div" style="width: 900px; height: 400px;"></div>
> everything works fine...
>
>
> Help, please... i'm out of solution. I even tried using an iframe but it
> produce the same bug.
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/-Qct7MREPY8J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.