Charts · Gutenberg

Doughnut Chart block for WordPress

Pie/doughnut chart with adjustable cutout, center label, and per-slice colors using Chart.js (CDN).

Get Blockenberg

Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.

Get Blockenberg

What it actually does

Pie/doughnut chart with adjustable cutout, center label, and per-slice colors using Chart.js (CDN).

Inspector panels on this block: Slices, Chart Style, Background. Those titles come from index.js, not from a shared template.

Behavior controls: “Legend Position” options: Top, Bottom, Left, Right.

Where to find it

Gutenberg inserter → Charts → search “Doughnut Chart” (block name `blockenberg/doughnut-chart` in block.json). Style it in the sidebar after insert.

How to use Doughnut Chart block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Doughnut Chart”, insert it. Category: Charts.
  3. Configure inspector controls that exist on this block. Open Slices. Set “Label”, “Value”, “Title (optional)”, “Cutout % (0=pie, 60=doughnut)”.
  4. Check the published page. The view script reads HTML data attributes: data-cutout, data-legend, data-legend-pos, data-size, data-slices. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
LabelText field in the inspector.
ValueNumeric range control in the inspector. Range 1–1000.
Title (optional)Text field in the inspector. Saved as `title`.
Cutout % (0=pie, 60=doughnut)Numeric range control in the inspector. Range 0–90. block.json default: 60. Saved as `cutout`.
Chart Size (px)Numeric range control in the inspector. Range 160–600. block.json default: 300. Saved as `size`.
Center LabelText field in the inspector. Saved as `centerLabel`.
Center Sub-LabelText field in the inspector. Saved as `centerSubLabel`.
Show LegendOn/off toggle in the inspector. On by default. Saved as `showLegend`.
Legend PositionSelect control; the chosen value is saved on the block. Options: Top; Bottom; Left; Right. block.json default: bottom. Saved as `legendPos`.
Card Border Radius (px)Numeric range control in the inspector. Range 0–32. block.json default: 12. Saved as `borderRadius`.
Card BackgroundColor control in the inspector. block.json default: #ffffff. Saved as `bgColor`.
Typography — TitleShared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoTitle`.

What the front-end script actually does

When this is the right block

Notes from the implementation

viewScript: this folder’s frontend.js is enqueued on the front end for this block.

FAQ

How do I add the Doughnut Chart block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Doughnut Chart”. It sits under Charts. After insert, open Slices and set “Label”, “Value”, “Title (optional)”, “Cutout % (0=pie, 60=doughnut)”.

Does Doughnut Chart need a server or extra plugin?

No. After Blockenberg is active, the view script runs in the browser with the values you saved on the block.

Is the Doughnut Chart Gutenberg block free?

Yes. Doughnut Chart ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style Doughnut Chart to match my theme?

Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Slices, Chart Style, Background).

Related charts blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Doughnut Chart from the Gutenberg inserter.

Get Blockenberg