Hi Amol,

If you are using this success handler more than once, you will likely have
unpredictable problems with it because of two main problems: You have
several global variables that, when you assign to them, the values will
replace previous values:  data2, aP, bP, cP, dP, and maybe more.  Moreover,
you are drawing the PieChart always in an element called 'chart_divRev'.
 It might be that only one element is used, or if you have more than one
element that has the same id, which one gets used may depend on timing.  So
you need to use a different id each time.

I can't tell why your errors are occurring when you hover on the charts.
 It would be best if you could provide a link to a page that demonstrates
the error.


On Tue, Jun 10, 2014 at 6:55 AM, Amol Bhosle <[email protected]> wrote:

> Hello ,
>       I've used google pie charts. The replicate code which will reproduce
> error in < IE8 is as follows:
>
>
>     success:function(data){
>  data2 =data.split(",");
> aP=parseFloat(trim(data2[2]));
> bP=parseFloat(trim(data2[3]));
> cP=parseFloat(trim(data2[1]));
>
> var data = new google.visualization.arrayToDataTable([
>                                        ['Tasks', 'Total'],
>                                        ['NI', cP],
>                                        ['I', aP],
>                                        ['S, bP]
>                                        ]);
> var options = {
> title: 'A',
> legend: { position: 'bottom',textStyle:{color: '#274b6d',fontSize: 11}},
> colors: ['#0D233A', '#8BBC21', '#910000'],
> sliceVisibilityThreshold:0,
> pieSliceText:'none',
> titleTextStyle:{color: '#274b6d',fontSize: 13,fill: '#274b6d'}
> };
> var chart = new
> google.visualization.PieChart(document.getElementById('chart_div'));
>  function selectHandler1() {
>           var selectedItem = chart.getSelection()[0];
>           if (selectedItem) {
>             var taskS = data.getValue(selectedItem.row, 0);
>             category = 'aa';
>             show(taskS,category);
>           }
>         }
> google.visualization.events.addListener(chart, 'select', selectHandler1);
>
> chart.draw(data, options);
>
> if(data2.length>=10)
> {
> aP=parseFloat(trim(data2[11]));
> bP=parseFloat(trim(data2[10]));
> cP=parseFloat(trim(data2[5]));
> dP=parseFloat(trim(data2[6]));
>
> var dataApp = new google.visualization.arrayToDataTable([
>                                        ['Tasks', 'Total'],
>                                        ['NR', aP],
>                                        ['R', bP],
>                                        ['I', cP],
>                                        ['A', dP]
>
>                                        ]);
> var optionsApp = {
> title: 'AR',
> legend: { position: 'bottom',textStyle:{color: '#274b6d',fontSize: 11}},
> colors: ['#2f7ed8', '#0d233a', '#8BBC21', '#910000'],
> sliceVisibilityThreshold:0,
> pieSliceText:'none',
> titleTextStyle:{color: '#274b6d',fontSize: 13,fill: '#274b6d'}
> };
> var chartApp = new
> google.visualization.PieChart(document.getElementById('chart_divApp'));
> function selectHandler2() {
>           var selectedItem = chartApp.getSelection()[0];
>           if (selectedItem) {
>             var taskSapp = dataApp.getValue(selectedItem.row, 0);
>             category = 'AR';
>             show(taskSapp,category);
>           }
>         }
> google.visualization.events.addListener(chartApp, 'select',
> selectHandler2);
>
> chartApp.draw(dataApp, optionsApp);
> // Reviewer Review : Pie Chart
> aP=parseFloat(trim(data2[12]));
> bP=parseFloat(trim(data2[7]));
> cP=parseFloat(trim(data2[8]));
> dP=parseFloat(trim(data2[9]));
>
> var dataRev = new google.visualization.arrayToDataTable([
>                                        ['Tasks', 'Total'],
>                                        ['NR', aP],
>                                        ['R', bP],
>                                        ['I', cP],
>                                        ['A', dP]
>
>                                        ]);
> var optionsRev = {
> title: 'RR',
> legend: { position: 'bottom',textStyle:{color: '#274b6d',fontSize: 11}},
> colors: ['#2f7ed8', '#0d233a', '#8BBC21', '#910000'],
> sliceVisibilityThreshold:0,
> pieSliceText:'none',
> titleTextStyle:{color: '#274b6d',fontSize: 13,fill: '#274b6d'}
> };
> var chartRev = new
> google.visualization.PieChart(document.getElementById('chart_divRev'));
> function selectHandler3() {
>           var selectedItem = chartRev.getSelection()[0];
>           if (selectedItem) {
>             var taskSrev = dataRev.getValue(selectedItem.row, 0);
>             category = 'RR';
>             show(taskSrev,category);
>           }
>         }
> google.visualization.events.addListener(chartRev, 'select',
> selectHandler3);
>
> chartRev.draw(dataRev, optionsRev);
> }
>
>
> Several errors on hovering on charts.
>
> Error :script70:permission denied ,line 86 character 16
>
> --
> 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.
>



-- 
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>  -
978-394-1058
[email protected] <[email protected]>   5CC, Cambridge MA
[email protected] <[email protected]> 9 Juniper Ridge
Road, Acton MA

-- 
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.

Reply via email to