Skip to content

Pie / donut

js
{
  chartType: 'pie',
  seriesData: [
    ['Category', 'Value'],
    ['North', 45],
    ['South', 30],
    ['West', 25],
  ],
  title: { visible: true, text: 'Share' },
  subtitle: { visible: false, text: '' },
}

Donut

Ask for 'donut' — it is a pie whose hole is already open. The alias seeds pie.innerRadiusRatio: 0.5, so you do not need to set it yourself:

js
{
  chartType: 'donut',
  seriesData: [['Category', 'Value'], ['North', 45], ['South', 30]],
}

Set innerRadiusRatio only to override the default hole size (0 is a full pie, 1 is all hole):

js
{ chartType: 'donut', pie: { innerRadiusRatio: 0.7 } }

donut is an input-only alias, so getChartData() reports the canonical chartType: 'pie' with innerRadiusRatio: 0.5. The donut survives the round-trip — the name does not.

Sample

Live chart and copy-paste HTML: Pie sample.

Developer & LLM documentation · Not the end-user Help Center · Help Center