Google chart with me in 5 minutes

Dear Friends,
After using MS Chart I am just wondering on net for more charting examples and articles in searching part I just found google chart.
I just thought let try it so here I am with a sample application which will give you an overview how google charting work.
The First and most important thing in google charting is its url.
Google chart provide you many chart type and its easy to use also.
Lets start with main url for google chart http://code.google.com/apis/chart/basics.html
Now the intresting thing is querystring variables which we passed with this url we start one by one here.
1) Chs :- The first part is chs. By the name you can understand that it means chart size. Here you can put your chart size in pixel like 200*300 etc.
2)cht:- Another most important variable in cht by the name you can understand that it means chart type. You can assign following value for chart type 1) cht = (lc,ls,lxy) its used for line chart
2) cht = (bhs,bvs,bhg,bvg) its used for Bar charts
3) cht = (p,p3,pc,chp) Pie chart
4) cht = (v) venn diagram
5) cht = (s) Scatter ploting chart
6) cht = (r,rs) Radar charts
7) cht =(gom) another itresting part (Google -o-meters)

3)chd :- By the name you can understand that its charting data or we can say that series.For this google has provided mainly 3 data format by which we can send data
1) text formating (Used as chd = t: series values)
2) Simple fomating (used as chd = s:series values)
3) Extended encoding (used as chd= e: series values)

4) cht:- its means chart type you can define chart title with this option.
5) chl:- you can define chart label with this.
You can put specific axis label by using it for example chxt = x,y,r,t
For more detail you can visit http://code.google.com/apis/chart/labels.html#chart_legend

With this require variables you can easily plot a graph..
Lets try with the example which we have taken in my earlier post (“Introduction of Microsoft Chart control in 5 minutes Part -Ist”)
Same salary saving structure if we have to show in pie chart with 3d effect then

You can view samplet at and download code also.
http://www.indiandotnetwithgooglechart.tk
enjoy google chart
Enjoy asp.net programming.
Thanks
Rajat Jaiswal

Advertisements

One thought on “Google chart with me in 5 minutes

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s