Google Charts
Display live data on your site
1
Google Charts Display live data on your site 1 Using Google Charts - - PowerPoint PPT Presentation
Google Charts Display live data on your site 1 Using Google Charts https://developers.google.com/chart 2 3 we want to represent this data 4 Step 1 create a container div inside an html page 5 Step 2 create a .js fi le with the following
1
https://developers.google.com/chart
2
3
we want to represent this data
4
5
create a container div inside an html page
6
create a .js file with the following content
we’re going to define this function!
7
create the drawChart() function
8
define the data
9
my data
…set the options
10
…continue
11
end of the drawChart() function this will draw a pie chart
12
complete code
import google’s api and our script inside the html
13
14
https://developers.google.com/chart/interactive/docs/gallery/ piechart#Configuration_Options
15
16
17
just replace PieChart with BarChart
18
more charts on
https://developers.google.com/chart/interactive/docs/gallery
19
Both pie and bar charts are included in the corechart package However, if you want a treemap or geo chart on your page, you must additionally load the 'treemap' or 'geomap' packages.