Hi,
I am facing problem with Google Visualization API only in IE. In
Firefox works properly.please help me out to solve the problem.i am
integrating motion chart in joomla.please check the sample code below.
function important_issue_operation($option , $chart)
{
$db =& JFactory::getDBO();
?>
<div align="center" class="contentheading"> <?php echo $chart;
?></
div>
<script type="text/javascript"
src="http://www.google.com/jsapi"></
script>
<script type="text/javascript">
google.load('visualization', '1', {'packages':['motionchart']});
google.setOnLoadCallback(drawChart);
/*---------------------- Function Draw Chart starts Here
-------------------------*/
function drawChart()
{
var data = new google.visualization.DataTable();
data.addColumn('string', 'District');
data.addColumn('number', 'Year');
data.addColumn('number', 'Major');
data.addColumn('number', 'Minor');
<?php
for($yr=2007;$yr<=2008;)
{
for($dist=1;$dist<=34;$dist++)
{
$qry = "select value from
table1 where year=$yr and
district_id=$dist and breed=22";
$res=
$db->setQuery($qry);
$total_major =
$db->loadResult($res);
$qry1 = "select value
from table1 where year=$yr and
district_id=$dist and breed=23";
$res1=
$db->setQuery($qry1);
$total_minor =
$db->loadResult($res1);
$qry = "select
district_name from table2 where id=$dist";
$res=
$db->setQuery($qry);
$district =
$db->loadResult($res);
?>
data.addRows([
['<?php echo
$district;?>',<?php echo $yr;?>,<?php echo
$total_major;?>,<?php echo $total_minor;?>],
]);
<?php }
$yr=$yr+1;
}?>
var chart = new google.visualization.MotionChart
(document.getElementById('chart_div'));
chart.draw(data, {width: 700, height:450});
}
/*-------------- Draw Chart Ends Here
---------------------------------------- */
</script>
<div id="chart_div" style="width: 700px; height: 450px;"></div>
<?php
}
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
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.