Overview Google Charts provides a perfect way to visualize data with a various presentation charts by embed a simple Javascript in your web page. All chart types are populated with data using DataTable class
Load the charts For Geochart and Map Chart, you must load both the old library loader and the new library
Prepare the Data // Create the data table. var data = new google.visualization.DataTable (); data.addColumn ('string', 'Topping'); data.addColumn ('number', 'Slices'); data.addRows ([ ['Mushrooms', 3], ['Onions', 1], ['Olives', 1], ['Zucchini', 1], ['Pepperoni', 2] ]);
Prepare the Data var data = [ ['Topping', ' Slices’] , ['Mushrooms', 3], ['Onions', 1], ['Olives', 1], ['Zucchini', 1], ['Pepperoni', 2] ] var data = new google.visualization.arrayToDataTable (data);
Customize the chart var options = { legend: ' left ', title : ' My Big Pie Chart' , chartArea : { top : 50, height : '80%' }, hAxis : { gridlines : { count : 0 } }, } https:// google-developers.appspot.com /chart/interactive/docs/ customizing_charts
Draw the Chart var chart = new google.visualization.LineChart ( document.getElementById (' chart_div ')) ; chart.draw (data, options);