Google chart

286 views 9 slides Oct 05, 2016
Slide 1
Slide 1 of 9
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9

About This Presentation

How to load google chart js


Slide Content

Google Chart 14 th June 2016 By Kimsrung Lov

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

Chart Gallery https://google-developers.appspot.com/chart/interactive/docs/ gallery https://google-developers.appspot.com/chart/interactive/docs/ more_charts https:// jsfiddle.net / api /post/library/pure/

Q & A Thanks You!