Charts · Gutenberg

Area Chart block for WordPress

Smooth filled area chart with multiple datasets, gradient fills, and animation using Chart.js (CDN). Great for showing trends over time.

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

Smooth filled area chart with multiple datasets, gradient fills, and animation using Chart.js (CDN). Great for showing trends over time.

Inspector panels on this block: Data, Chart Options, Axes, Card Style. Those titles come from index.js, not from a shared template.

Behavior controls: “Data (CSV)” (e.g. 40,55,72,65); “X-Axis Labels (CSV)” (e.g. Jan,Feb,Mar,Apr); “Legend position” options: Top, Bottom, Left, Right.

Where to find it

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

How to use Area 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 “Area Chart”, insert it. Category: Charts.
  3. Configure inspector controls that exist on this block. Open Data. Set “Label”, “Data (CSV)”, “Fill area”, “Line tension”.
  4. Check the published page. The view script reads HTML data attributes: data-anim-duration, data-animate, data-datasets, data-gradient-alpha, data-gradient-fill, data-height, data-labels, data-legend-pos. 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.
Data (CSV)Text field in the inspector. e.g. 40,55,72,65.
Fill areaOn/off toggle in the inspector.
Line tensionNumeric range control in the inspector. Range 0–0.9.
X-Axis Labels (CSV)Text field in the inspector. e.g. Jan,Feb,Mar,Apr. block.json default: Jan,Feb,Mar,Apr,May,Jun,Jul,Aug. Saved as `labels`.
Height (px)Numeric range control in the inspector. Range 160–700. block.json default: 340. Saved as `height`.
Gradient fillOn/off toggle in the inspector. On by default. Saved as `gradientFill`.
Gradient alpha %Numeric range control in the inspector. Range 5–60. block.json default: 20. Saved as `gradientAlpha`.
Show gridOn/off toggle in the inspector. On by default. Saved as `showGrid`.
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: top. Saved as `legendPos`.
Show data pointsOn/off toggle in the inspector. On by default. Saved as `showPoints`.
Point size (px)Numeric range control in the inspector. Range 2–10. block.json default: 4. Saved as `pointSize`.
Line width (px)Numeric range control in the inspector. Range 1–6. block.json default: 2. Saved as `lineWidth`.
Animate on loadOn/off toggle in the inspector. On by default. Saved as `animate`.
Animation duration (ms)Numeric range control in the inspector. Range 200–2000. block.json default: 800. Saved as `animDuration`.
X Axis labelText field in the inspector. Saved as `xLabel`.
Y Axis labelText field in the inspector. Saved as `yLabel`.
Y Min (leave blank for auto)Text field in the inspector. Saved as `yMin`.
Y Max (leave blank for auto)Text field in the inspector. Saved as `yMax`.
Card radius (px)Numeric range control in the inspector. Range 0–32. block.json default: 12. Saved as `cardRadius`.
Padding top (px)Numeric range control in the inspector. Range 0–200. block.json default: 0. Saved as `paddingTop`.
Padding bottom (px)Numeric range control in the inspector. Range 0–200. block.json default: 0. Saved as `paddingBottom`.

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 Area Chart block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Area Chart”. It sits under Charts. After insert, open Data and set “Label”, “Data (CSV)”, “Fill area”, “Line tension”.

Does Area 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 Area Chart Gutenberg block free?

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

Can I style Area 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: Data, Chart Options, Axes, Card Style).

Related charts blocks

Get Blockenberg

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

Get Blockenberg