PieChart
The PieChart is a plot operator that computes a pie chart for a given vector dataset.
Moreover, the operator considers all data in the given query rectangle.
There are multiple variants on how to compute the slices of the pie chart. In addition, it is possible to compute a donut chart instead of a standard pie chart.
Errors
Section titled “Errors”The operator returns an error in the following cases.
- The
attributefor the givencolumnNamedoes not exist. - The number of slices is too large: If the number of slices is greater than
32, the operator returns an error.
If the attribute has a Measurement of type Classification, the operator uses the class name instead of the raw value.
Parameters
Section titled “Parameters”| Name | Type | Description | Examples |
|---|---|---|---|
| type | string | "count" |
|
| columnName | string | The names of the attribute to generate pies for. | "name""class" |
| donut | boolean | Whether to render the chart as a donut. | false |
Sources
Section titled “Sources”| Name | Type | Description |
|---|---|---|
| vector | VectorOperator | An operator that produces vector data. |
Examples
Section titled “Examples”{ "type": "PieChart", "params": { "type": "count", "columnName": "class", "donut": false }, "sources": { "vector": { "type": "OgrSource", "params": { "data": "land_use" } } }}