Skip to main content
Version: Next

Pie Chart

Proportions of a whole, as a pie, donut (set innerRadius) or rose. Useful for a handful of categories that genuinely sum to something meaningful.

The Pie Chart component as it renders with its default settings.The Pie Chart component as it renders with its default settings.

Reach for it when you need:

  • Downtime split by category
  • Scrap reasons as a share of total

Component name: PieChart · Category: Chart

In the palette: Pie — set innerRadius for a donut, or the rose toggle. Bind data to a named query; click a slice to expose {{point.value}} and {{point.percent}}.

Properties

Any property can be bound to a tag, another component's property, or a query.

PropertyTypeDefaultDescription
dataarray[{"name":"Running","value":62},{"name":"Idle","value":20},{"… (truncated)Array of row objects. Bind to a named query ({{query.MyQuery}}), a tag, or edit inline. Rows map to series via categoryField + seriesFields (auto-derived when empty).
categoryFieldstring""Row key for the category/name axis. Empty ⇒ first non-numeric column.
seriesFieldsarray[]Which columns become series (+ per-series color, and stack/area/renderAs where they apply). Empty ⇒ all numeric columns.
animationbooleantrueEnable enter/update animation.
animationDurationnumber600ms.
animationEasingenumcubicOutOptions: linear · cubicIn · cubicOut · cubicInOut · quadraticOut · elasticOut · bounceOut.
animationDelaynumber0Per-datum stagger (ms).
titleobject{"show":true,"text":"","subtext":"","left":"left"}
legendobject{"show":true,"type":"plain","orient":"horizontal","left":"ce… (truncated)
tooltipobject{"show":true,"trigger":"axis","axisPointerType":"line"}
colorPalettestring""Comma-separated series colors (e.g. #2563eb, #16a34a). Empty ⇒ theme palette.
backgroundColorcolor""Empty ⇒ transparent/theme.
innerRadiusnumber0Donut hole as % of radius: 0 = full pie, > 0 = donut (e.g. 45).
outerRadiusnumber70Outer radius as % of the available space.
rosebooleanfalseNightingale/rose chart — slice radius encodes the value.
borderRadiusnumber0
dataLabelobject{"show":false,"position":"top"}
enableClickbooleantrueFire the Data click event + expose lastClicked.
lastClickedobject{}Output (bind from this): the last-clicked datum — {{ ThisChart.lastClicked.value }}.
optionOverridestring""Power user: paste a raw JSON object of chart options to deep-merge over the built chart, e.g. {"series":[{"itemStyle":{"color":"#e11"}}]}. Empty = none.
emptyMessagestringNo data
stylestyle{}Custom CSS properties

Events

Attach event actions to these in the Event Manager.

EventLabelGroupPayload
clickClickMouseThe DOM event.
dblclickDouble clickMouseThe DOM event.
contextmenuRight clickMouseThe DOM event.
mouseenterMouse enterMouseThe DOM event.
mouseleaveMouse leaveMouseThe DOM event.
dataClickData clickChartThe clicked datum, under point.
dataDblClickData double clickChartThe clicked datum, under point.
legendSelectLegend toggleChartThe toggled series.
Right-click behaves differently in the Designer

contextmenu fires your configured actions at runtime only — in LiveView and in preview. On the Designer canvas the right-click is captured to open the Event Manager, so testing it there will not run your actions. Test right-click in preview.

Notes

Pies are hard to read beyond about five slices, and hopeless for comparing similar values. If the reader has to compare slice sizes, use Bar Chart instead.