A pie chart is a circular statistical chart divided into several sectors. In a pie chart, the arc length (as well as the central angle and area) of each sector represents the proportion of that category to the whole, and these sectors together form a complete circle. The most prominent function of a pie chart is to show proportions. Conventionally, people also use pie charts to compare the sizes of sectors to gain an understanding of the data. However, since humans are less perceptive of angles than lengths, pie charts are often inadequate when exact values need to be expressed (especially when values are close or numerous); bar charts are recommended instead. In terms of data, a pie chart generally requires one categorical data field and one continuous data field. It is worth noting that the data in the categorical field should, in the context of the chart, constitute a whole (e.g., Product A, Product B, and Product C make up the entire product line), rather than being independent and unrelated.
2024 Global Mobile OS Market Share
Enterprise IT Budget Allocation (Donut Chart, Custom Colors)
Global Energy Consumption Structure, Custom Palette
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | required | Value must be "pie". |
| data | Object[] | required | Chart data. |
| data.category | string | required | Category name. |
| data.value | number | required | Data value. Percentage values cannot be used. |
| innerRadius | number | optional | Set to 0.6 to enable donut chart mode. |
| title | string | optional | Chart title. |
| theme | 'default' | 'dark' | 'academy' | optional | Chart theme, default is "default". |
| style | Object | optional | Chart style. |
| style.backgroundColor | string | optional | Must be a valid color value. |
| style.palette | string[] | optional | Must be an array of valid color values. |