Google Chart Tools
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 |
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 |
---|---|---|
|
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 The Google Chart API calculates the circle's radius from the minimum of
width and height specified in the chart size ( |
|
|
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. |
|
|
A concentric pie chart. Supply two or more data series. |
|
All types | Negative numbers in data cause "blank" slices. | cht=pc |
http://code.google.com/apis/chart/docs/making_charts.html
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步