google.charts.load('current', { 'packages': ['corechart'] });
google.charts.setOnLoadCallback(drawChart());
// Draw the chart and set the chart values
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Task', 'Queue Count'],
['Andaman', AndamanWaitCount],
['Andhra Pradesh', AndhraPradeshWaitCount],
['Arunachal Pradesh', ArunachalWaitCount],
['Assam', AssamWaitCount],
['Bihar', BiharWaitCount],
['Chhattisgarh', ChhattisgarhWaitCount],
['Delhi', DelhiWaitCount],
['DNDD', DNDDWaitCount],
['Goa', GoaWaitCount],
['Gujarat', GujaratWaitCount],
['Haryana', HaryanaWaitCount],
['Himachal', HimachalWaitCount],
['Jammu', JammuWaitCount],
['Jharkhand', JharkhandWaitCount],
['Karnataka', KarnatakaWaitCount],
['Kerala', KeralaWaitCount],
['Lakshadweep', LakshadweepWaitCount],
['Madhya Pradesh', MPWaitCount],
['Maharashtra', MaharashtraWaitCount],
['Manipur', ManipurWaitCount],
['Meghalaya', MeghalayaWaitCount],
['Mizoram', MizoramWaitCount],
['Nagaland', NagalandWaitCount],
['Orissa', OrissaWaitCount],
['Puducherry', PuducherryWaitCount],
['Punjab', PunjabWaitCount],
['Rajasthan', RajasthanWaitCount],
['Sikkim', SikkimWaitCount],
['Tamil Nadu', TNWaitCount],
['Telangana', TelanganaWaitCount],
['Tripura', TripuraWaitCount],
['Uttarakhand', UttarakhandWaitCount],
['Uttar Pradesh', UPWaitCount],
['West Bengal', WBWaitCount]
]);
// Optional; add a title and set the width and height of the chart
// var options = { 'title': '', 'width': 1200, 'height': 400 };
var options = { 'title': 'Location wise Wait Count', 'chartArea': { left: 50, top: 30, width: '100%' }, 'fontName': 'Verdana', 'fontSize': '12', 'legend': { position: "none" }, 'isStacked': true };
// Display the chart inside the element with id="piechart"
var chart = new google.visualization.ColumnChart(document.getElementById('columnchart'));
chart.draw(data, options);
}
in count i m getting values once after attaching those values to graph i m getting the graph properly but its flickering each time once the page is uploaded so i m not getting how to call ajax function in chart