I am using google pie chart in , chart is being displayed properly in ie
7,9,10,11 but not in ie 8.
can some please tell me how can i make it work in ie 8.
Below is my code.
I can get the pie chart in IE 7,9,10,11
but in IE 8 chart doesnt display,can you please let me know how can i get
the chart to be displayed in IE 8 as well.
<html>
<head>
<?php
$state = 'sg';
$fdate_n = '06022015';
$tdate_n = '08022015';
?>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Foreign Remittance</title>
<style>
html,
body { height: 100%; padding:0;margin:0;background-color:#FFFFFF
;font-family: 'Source Sans Pro', sans-serif;}
th.Branch{
width: 15%
}
</style>
<script type="text/javascript" src="googlejs/jsapi.js"></script>
<script src="googlejs/jquery.min.js"></script>
<script src="googlejs/uds_api_contents.js"></script>
<link href="css/styles.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var fdate_n = "<?php echo $fdate_n; ?>";
var tdate_n = "<?php echo $tdate_n ; ?>";
var state = "<?php echo $state ; ?>";
var json = $.ajax({
url: 'data.php', // make this url point to the data file
dataType: 'json',
type: 'POST',
data: "fdate="+fdate_n+"&tdate="+tdate_n+"&state="+state,
async: false
}).responseText;
var data = new google.visualization.DataTable(json);
var options = {
'tooltip': { isHtml: true },
'chartType': 'PieChart',
'containerId': 'chart1',
'title':'Breakup',
'width': 1090,
'height': 700,
'chartArea': {top: 0, right: 0, bottom: 0, width: "80%", height: "100%"},
is3D: true
};
var chart = new
google.visualization.PieChart(document.getElementById('piechart_3d'));
google.visualization.events.addListener(chart, 'ready', function () {
var group = google.visualization.data.group(data, [{
type: 'number',
column: 0,
modifier: function () {
return 0;
}
}], [{
type: 'number',
column: 1,
aggregation: google.visualization.data.sum
}]);
var total = parseFloat(group.getValue(0, 1)).toFixed(2);
function intToFormat(nStr)
{
nStr += '';
x = nStr.split('.');
x1 = x[0];
x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
var z = 0;
var len = String(x1).length;
var num = parseInt((len/2)-1);
while (rgx.test(x1))
{
if(z > 0)
{
x1 = x1.replace(rgx, '$1' + ',' + '$2');
}
else
{
x1 = x1.replace(rgx, '$1' + ',' + '$2');
rgx = /(\d+)(\d{2})/;
}
z++;
num--;
if(num == 0)
{
break;
}
}
return x1 + x2;
};
var res = intToFormat(total);
$("#total").text(res);
//$("#total").text(total);
});
chart.draw(data, options);
}
</script>
</head>
<body>
<!--<div id="piechart_3d" style="width: 900px; height: 500px;"></div>-->
<center>
<div id="parentDiv" >
<div id="headerDiv">
<div id="logoDiv" style="float:left;position:relative;">
<img align="left" height="100px" alt="So" src="images/sn.jpg" />
<img align="left" height="100px" alt="So" src="images/fr.png"
style="margin-left:44px;" />
</div>
</div>
<div id='barDiv'>
<div id='cssmenu'>
<ul>
<li ><a href='index.php'><span style="color:white">Home</span></a></li>
<li style="padding-left:800px"><a href='state_chart_index.php'><span
style="color:white;">Back</span></a></li>
</ul>
</div>
</div>
<div style="padding-top:35px" align="center"><b> Displayed chart is from
<? echo $from; ?> to <? echo $to; ?> for <? echo $s; ?> </b></br>
<div id="dashboard" style="padding-top:20px;">
<table>
<tr style='vertical-align: top'>
<td style='width: 400px; font-size: 0.9em;padding-top:50px'>
<div id="totaltext" style='padding-top:50px'>
<p><u><font color="green">Tr</font></u></br>r.<span id='total'>
</span>/-</p>
</div>
<!--<div id="control3"></div> -->
</td>
<td style='width: 600px,height: 900px'>
<div style="float: left;padding-top:50px"
id="piechart_3d"></div>
<!--<div style="float: left;" id="chart2"></div>
<div style="float: left;" id="chart3"></div> -->
</td>
</tr>
</table>
</div>
<div> </div>
</body>
</html>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.