Charts · Gutenberg
Dumbbell Chart block for WordPress
Horizontal dumbbell (connected dot) chart comparing two values per category — ideal for before/after, target vs actual, or two-group comparisons.
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.
What it actually does
Horizontal dumbbell (connected dot) chart comparing two values per category — ideal for before/after, target vs actual, or two-group comparisons.
Inspector panels on this block: Chart Settings, Layout, Data. Those titles come from index.js, not from a shared template.
Dumbbell Chart has no render.php and no frontend.js. The saved Gutenberg HTML is what visitors see, plus Blockenberg layout/typography CSS.
Where to find it
Gutenberg inserter → Charts → search “Dumbbell Chart” (block name `blockenberg/dumbbell-chart` in block.json). Style it in the sidebar after insert.
How to use Dumbbell Chart block for WordPress
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Dumbbell Chart”, insert it. Category: Charts.
- Configure inspector controls that exist on this block. Open Chart Settings. Set “Chart Settings — Title”, “Show Title”, “Show Values”, “Show Grid Lines”.
- Publish. Save the page. Output is the saved block HTML; typography/colors follow Blockenberg shared panels.
Inspector controls from this block’s code
| Control | What the code does |
|---|---|
| Chart Settings — Title | Text field in the inspector. block.json default: Performance: Before vs After. Saved as `title`. |
| Show Title | On/off toggle in the inspector. On by default. Saved as `showTitle`. |
| Show Values | On/off toggle in the inspector. On by default. Saved as `showValues`. |
| Show Grid Lines | On/off toggle in the inspector. On by default. Saved as `showGridLines`. |
| Show Legend | On/off toggle in the inspector. On by default. Saved as `showLegend`. |
| Label A (Before) | Text field in the inspector. block.json default: Before. Saved as `labelA`. |
| Label B (After) | Text field in the inspector. block.json default: After. Saved as `labelB`. |
| Canvas Width | Numeric range control in the inspector. Range 300–1200. block.json default: 700. Saved as `svgWidth`. |
| Row Height | Numeric range control in the inspector. Range 28–100. block.json default: 48. Saved as `rowHeight`. |
| Label Column Width | Numeric range control in the inspector. Range 60–320. block.json default: 160. Saved as `padLeft`. |
| Dot Radius | Numeric range control in the inspector. Range 5–28. block.json default: 11. Saved as `dotRadius`. |
| Typography — Title | Shared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoTitle`. |
| Label Font Size | Numeric range control in the inspector. Range 9–22. block.json default: 13. Saved as `labelFontSize`. |
| Value Font Size | Numeric range control in the inspector. Range 7–16. block.json default: 11. Saved as `valueFontSize`. |
| Legend Font Size | Numeric range control in the inspector. Range 9–18. block.json default: 12. Saved as `legendFontSize`. |
| Dot A Color | Color control in the inspector. block.json default: #9ca3af. Saved as `colorA`. |
| Dot B Color | Color control in the inspector. block.json default: #4f46e5. Saved as `colorB`. |
| Connector Color | Color control in the inspector. block.json default: #e5e7eb. Saved as `connectorColor`. |
| Colors — Background | Color control in the inspector. block.json default: #ffffff. Saved as `bgColor`. |
| Grid Lines | Color control in the inspector. block.json default: #f3f4f6. Saved as `gridColor`. |
| Title Color | Color control in the inspector. block.json default: #111827. Saved as `titleColor`. |
| Label Color | Color control in the inspector. block.json default: #374151. Saved as `labelColor`. |
| Label | Text field in the inspector. |
When this is the right block
- Horizontal dumbbell (connected dot) chart comparing two values per category — ideal for before/after, target vs actual, or two-group comparisons — that is the job of Dumbbell Chart, not a generic content block.
- Use it when you need the editor control labeled “Chart Settings — Title”, which exists on this block’s inspector.
- It matches pages about dumbbell, chart, before after.
- Inserter grouping: reports, dashboards, and data-heavy pages.
Notes from the implementation
Static block: markup is saved in post content; no PHP render callback in this folder.
FAQ
How do I add the Dumbbell Chart block in WordPress?
Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Dumbbell Chart”. It sits under Charts. After insert, open Chart Settings and set “Chart Settings — Title”, “Show Title”, “Show Values”, “Show Grid Lines”.
What makes Dumbbell Chart different from other Blockenberg blocks?
Horizontal dumbbell (connected dot) chart comparing two values per category — ideal for before/after, target vs actual, or two-group comparisons. Inspector labels on this block include “Chart Settings — Title”, “Show Title”, “Show Values”, “Show Grid Lines”.
Is the Dumbbell Chart Gutenberg block free?
Yes. Dumbbell Chart ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.
Can I style Dumbbell 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: Chart Settings, Layout, Data).
Related charts blocks
Lollipop Chart
Elegant horizontal lollipop chart — thin stems with value circles at the end. A clean alternative to bar charts for rankings, scores, and comparisons.
Area Chart
Smooth filled area chart with multiple datasets, gradient fills, and animation using Chart.js (CDN). Great for showing trends over time.
Bar Chart
Vertical or horizontal bar chart with multiple datasets using Chart.js (CDN). Supports stacked, border radius, and custom colors.
Bubble Chart
Interactive bubble chart powered by Chart.js.
Comparison Table
Feature matrix comparing multiple plans with check/cross marks, text values, and a highlighted popular column.
Doughnut Chart
Pie/doughnut chart with adjustable cutout, center label, and per-slice colors using Chart.js (CDN).
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Dumbbell Chart from the Gutenberg inserter.