Charts · Gutenberg

Mixed Chart block for WordPress

Combination bar + line chart with an optional dual Y-axis. Perfect for overlaying revenue (bar) with growth rate (line) or any two related metrics in the same canvas. Powered by 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

Combination bar + line chart with an optional dual Y-axis. Perfect for overlaying revenue (bar) with growth rate (line) or any two related metrics in the same canvas. Powered by Chart.js CDN.

Inspector panels on this block: Datasets, Labels (X-axis), Chart Options, Axes, Card Style, Background. Those titles come from index.js, not from a shared template.

Behavior controls: “Chart type” options: Bar, Line; “Y-axis” options: Left (Y), Right (Y1); “Legend position” options: Bottom, Top, Left, Right.

Where to find it

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

How to use Mixed 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 “Mixed Chart”, insert it. Category: Charts.
  3. Configure inspector controls that exist on this block. Open Datasets. Set “Label”, “Chart type”, “Y-axis”, “Values (one per line)”.
  4. Check the published page. The view script reads HTML data attributes: data-chart. 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.
Chart typeSelect control; the chosen value is saved on the block. Options: Bar; Line.
Y-axisSelect control; the chosen value is saved on the block. Options: Left (Y); Right (Y1).
Values (one per line)Multiline text field in the inspector.
Labels (one per line)Multiline text field in the inspector. block.json default: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec. Saved as `labels`.
Show titleOn/off toggle in the inspector. On by default. Saved as `showTitle`.
Show subtitleOn/off toggle in the inspector. On by default. Saved as `showSubtitle`.
Chart Options — TitleText field in the inspector. block.json default: Revenue & Growth. Saved as `chartTitle`.
SubtitleText field in the inspector. block.json default: Monthly performance overview. Saved as `chartSubtitle`.
Chart height (px)Numeric range control in the inspector. Range 200–800. block.json default: 400. Saved as `chartHeight`.
Bar corner radiusNumeric range control in the inspector. Range 0–20. block.json default: 4. Saved as `barRadius`.
Line width (px)Numeric range control in the inspector. Range 1–6. block.json default: 2. Saved as `lineWidth`.
Dot size (px)Numeric range control in the inspector. Range 0–12. block.json default: 4. Saved as `dotSize`.
Fill opacity (%)Numeric range control in the inspector. Range 0–100. block.json default: 85. Saved as `fillAlpha`.
Show grid linesOn/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: Bottom; Top; Left; Right. block.json default: bottom. Saved as `legendPos`.
Entrance animationOn/off toggle in the inspector. On by default. Saved as `animate`.
Dual Y-axisOn/off toggle in the inspector. On by default. Saved as `dualAxis`.
Left Y-axis labelText field in the inspector. block.json default: Revenue ($K). Saved as `yLabel`.
Right Y-axis labelText field in the inspector. block.json default: Growth (%). Saved as `y1Label`.
Border radius (px)Numeric range control in the inspector. Range 0–40. block.json default: 14. Saved as `borderRadius`.
Card backgroundColor control in the inspector. block.json default: #ffffff. Saved as `bgColor`.
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 Mixed Chart block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Mixed Chart”. It sits under Charts. After insert, open Datasets and set “Label”, “Chart type”, “Y-axis”, “Values (one per line)”.

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

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

Can I style Mixed 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: Datasets, Labels (X-axis), Chart Options, Axes).

Related charts blocks

Get Blockenberg

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

Get Blockenberg