Posted by: Wildan Maulana | August 13, 2009

Pie Chart

Contoh 1

Pie Chart - Google Chart

Pie Chart - Google Chart

Pie Chart - OpenFlash Chart

Pie Chart - OpenFlash Chart

Potongan kode :

		$data = array(10,20,30,40,50,60,70,80,90,100,110);
		$OpenThinkChart = new OpenThinkChart('p','t'); 
		$OpenThinkChart->title = 'Pie Chart';
		$OpenThinkChart->width = 320 ;
		$OpenThinkChart->height = 210 ; 
		$OpenThinkChart->add_data(array_values($data),$colors); // adding values
		$OpenThinkChart->add_legend($data);
		$OpenThinkChart->chart->chp  = 0.628 ;

Catatan :

Untuk tipe p3 oleh OpenThink Chart API akan otomatis dianggap sebagai p, karena belum ada dukungan p3 di Open Flash Chart, sedangkan untuk tipe pc, mungkin akan langsung diubah ke tipe bar chart.

Referensi :

[1] Pie Chart, Google Chart API, http://code.google.com/apis/chart/types.html#pie_charts
[2] Pie Chart, Open Flash Chart, http://teethgrinder.co.uk/open-flash-chart-2/pie-chart-menu.php


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

Categories

%d bloggers like this: