Use CSS to position the divs:
#chart_div {
float: left
}
#chart_div2 {
float: right
}
.clear {
clear: both;
display: none;
}
When floating HTML elements, you should also add something to clear the
float effect after the floated elements; otherwise your HTML elements might
not line up the way you want:
<div id="chart_div"></div>
<div id="chart_div2"></div>
<div class="clear"></div>
Keep the "clear" div empty (as it won't be visible on the page).
On Saturday, September 8, 2012 8:34:13 PM UTC-4, Diana Flores wrote:
>
> Hi asgallant!!!!, you help me again!!!, i did the second option you
> suggest, it works!!!, its very important to add the div id at the end!!!
>
> function drawChart() {
>
> // data for the first chart!!!
> var jsonData =$.ajax({
> .................
> }).responseText;
>
> var data = new google.visualization.DataTable(.....);
> var options = {.....};
> var chart = new
> google.visualization.ColumnChart(document.getElementById('chart_div'));
>
> // data for the second
>
> var data2 = google.visualization.arrayToDataTable(......);
>
> var options2 = {.....};
>
> var chart2 = new
> google.visualization.LineChart(document.getElementById('chart_div2'));
>
> // draw 2 charts!!!
> chart2.draw(data2, options2);
> chart.draw(data,options);
>
> }
>
> </script>
> </head>
> <body>
> <div id="chart_div" ></div>
> <div id="chart_div2" ></div>
> </body>
> </html>
>
> But just one thing, how can i put the chart to the right? so they could be
> next to each other?
>
>
--
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/-/tfhA71FuX3oJ.
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.