Google Chart Tools

3881 단어 Google

Overview


Pie charts are good for showing simple proportional part-to-whole information. You can create a single series pie chart, where each series is made of multiple slices, or multi-series, concentric charts.
Each series describes one pie, and each data value specifies one slice. When using nested pie charts (described below), use multiple series.
To display the text associated with a slice, you will have to use either pie chart labels or a chart legend . Pie chart labels are text around the chart with lines pointing toward the slice. Legends are text associated by color.
Labels
Legend
Labels and Legend chl=January|February|March|April chdl=January|February|March|April chl=January|February|March|April
chdl=30°|40°|50°|60°

Values are displayed relative to each other: so a chart with values 1,2,3 will look the same as a chart with values 100,200,300. However, when using text format data, values greater than 100 are trimmed to 100, so you will need to use text format with custom scaling to display slices greater than 100 properly (use the chds parameter with min/max values of chds=0,<max-slice-size> ).
Negative values display as empty slices of the appropriate size.

Chart Types


There are three general types of pie charts that you can create: flat, concentric, or 3D. Specify a pie chart with the following syntax:
Syntax
cht=<chart_type>

Where <chart_type> is one of the the following types:
Parameter
Description
Example p
Two dimensional pie chart. Supply one data series only; subsequent data series are ignored. By default, pie segment colors are interpolated from dark orange to pale yellow. Specify other colors as described in Series Colors . Specify labels with chl as described in Pie chart labels . The Google Chart API calculates the circle's radius from the minimum of width and height specified in the chart size ( chs ) parameter. If you are including labels, you probably need to specify the size of the width to be twice the size of the height, to ensure that your labels are fully visible. cht=p
chs=200x100
p3
A three-dimensional pie chart. Specify data and formatting in the same way as for two dimensional pie charts, above. If you are including labels in a three-dimensional pie chart, you probably need to specify the size of the width to be 2.5 times the size of the height, to ensure that your labels are fully visible. cht=p3
chs=250x100
pc
A concentric pie chart. Supply two or more data series. cht=pc
chd=s:Helo,Wrld

All types
Negative numbers in data cause "blank"slices. cht=pc
chd=t:
10,-10,10,-10|
5,-5,5,-5,5,-5,5,-5,5,-5

 http://code.google.com/apis/chart/docs/making_charts.html



좋은 웹페이지 즐겨찾기