Hi,

 

I am having an issue with my Google charts using an Ajax request to fetch 
the chart data.

 

Through debugging the code I can see the Javascript function which draws my 
chart is being called.

 

The issue is the chart appears for a few seconds then disappears.

 

>From looking through the forum I am thinking it is some kind of issue with 
how the Google charts library is loaded.

 

I am loading  the library and calling the Javascript function which draws 
the chart after the Dom has completely loaded.

 

Could you perhaps give me some tips on what is the best way to debug this 
situation?

 

Any assistance you could give me would be much appreciated.


Below is a quick example of my chart script

 

Many thanks.

Aine



<script type="text/javascript">
         

       google.load("visualization", "1", {packages:["corechart","gauge"]});
                       
       function drawHitRatioChart(dataPoints) {
                     
          var data = google.visualization.arrayToDataTable([
                    ['Label', 'Value'],
                    ['Hit Ratio', {v: 50, f: ''}]
              ]);
                            
                var options = {
                        width: 450, height: 140,
                        redFrom: 0, redTo: dataPoints,  redColor: "#C1DAD6",
                        yellowFrom: dataPoints, yellowTo: 100, yellowColor: 
"#ACD1E9",
                        minorTicks: 10,
                        max: 100
              
        };
               
               var chart = new 
google.visualization.Gauge(document.getElementById('hitRatioGraph'));
              
              chart.draw(data, options);        
       }


}

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