Charts · Gutenberg
Scatter Chart block for WordPress
Interactive X/Y scatter plot powered by Chart.js. Reveal correlations and distributions in your data.
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
Interactive X/Y scatter plot powered by Chart.js. Reveal correlations and distributions in your data.
Inspector panels on this block: Datasets, Chart Options, Axes, Card Style. Those titles come from index.js, not from a shared template.
Behavior controls: “Point Style” options: Circle, Cross, Triangle, Rect, Star; “Legend Position” options: Top, Bottom, Left, Right.
Where to find it
Gutenberg inserter → Charts → search “Scatter Chart” (block name `blockenberg/scatter-chart` in block.json). Style it in the sidebar after insert.
How to use Scatter Chart block for WordPress
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Scatter Chart”, insert it. Category: Charts.
- Configure inspector controls that exist on this block. Open Datasets. Set “Label”, “Data points (x,y)”, “Show Title”, “Chart Options — Title”.
- Check the published page. The view script reads HTML data attributes: data-chart, data-height, data-initialized. The block editor preview may not run the same view script.
Inspector controls from this block’s code
| Control | What the code does |
|---|---|
| Label | Text field in the inspector. |
| Data points (x,y) | Multiline text field in the inspector. |
| Show Title | On/off toggle in the inspector. On by default. Saved as `showTitle`. |
| Chart Options — Title | Text field in the inspector. block.json default: Scatter Chart. Saved as `chartTitle`. |
| Show Subtitle | On/off toggle in the inspector. On by default. Saved as `showSubtitle`. |
| Subtitle | Text field in the inspector. block.json default: Correlation analysis. Saved as `chartSubtitle`. |
| Chart Height (px) | Numeric range control in the inspector. Range 200–700. block.json default: 400. Saved as `chartHeight`. |
| Point Size | Numeric range control in the inspector. Range 2–20. block.json default: 7. Saved as `pointSize`. |
| Fill Opacity % | Numeric range control in the inspector. Range 10–100. block.json default: 85. Saved as `fillAlpha`. |
| Point Style | Select control; the chosen value is saved on the block. Options: Circle; Cross; Triangle; Rect; Star. block.json default: circle. Saved as `pointStyle`. |
| Show Grid | On/off toggle in the inspector. On by default. Saved as `showGrid`. |
| Show Legend | On/off toggle in the inspector. On by default. Saved as `showLegend`. |
| Legend Position | Select control; the chosen value is saved on the block. Options: Top; Bottom; Left; Right. block.json default: bottom. Saved as `legendPos`. |
| Animate on load | On/off toggle in the inspector. On by default. Saved as `animate`. |
| X Axis Label | Text field in the inspector. Saved as `xLabel`. |
| Y Axis Label | Text field in the inspector. Saved as `yLabel`. |
| X Min | Text field in the inspector. Saved as `xMin`. |
| X Max | Text field in the inspector. Saved as `xMax`. |
| Y Min | Text field in the inspector. Saved as `yMin`. |
| Y Max | Text field in the inspector. Saved as `yMax`. |
| Border Radius (px) | Numeric range control in the inspector. Range 0–32. block.json default: 14. Saved as `borderRadius`. |
| Card Background | Color control in the inspector. block.json default: #ffffff. Saved as `bgColor`. |
| Title Font Size (px) | Numeric range control in the inspector. Range 10–32. block.json default: 16. Saved as `titleFontSize`. |
| Label / Axis Font Size (px) | Numeric range control in the inspector. Range 8–24. block.json default: 12. Saved as `labelFontSize`. |
| Padding Top | Numeric range control in the inspector. Range 0–200. block.json default: 0. Saved as `paddingTop`. |
| Padding Bottom | Numeric range control in the inspector. Range 0–200. block.json default: 0. Saved as `paddingBottom`. |
What the front-end script actually does
- The view script reads HTML data attributes: data-chart, data-height, data-initialized.
- Charts are drawn with Chart.js in the browser from values saved on the block.
- An IntersectionObserver starts work when the block enters the viewport.
When this is the right block
- Interactive X/Y scatter plot powered by Chart.js. Reveal correlations and distributions in your data — that is the job of Scatter Chart, not a generic content block.
- Use it when you need the editor control labeled “Label”, which exists on this block’s inspector.
- It matches pages about chart, scatter, scatter plot.
- Inserter grouping: reports, dashboards, and data-heavy pages.
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 Scatter Chart block in WordPress?
Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Scatter Chart”. It sits under Charts. After insert, open Datasets and set “Label”, “Data points (x,y)”, “Show Title”, “Chart Options — Title”.
Does Scatter 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 Scatter Chart Gutenberg block free?
Yes. Scatter Chart ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.
Can I style Scatter 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, Chart Options, Axes, Card Style).
Related charts blocks
Bubble Chart
Interactive bubble chart powered by Chart.js.
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.
Doughnut Chart
Pie/doughnut chart with adjustable cutout, center label, and per-slice colors using Chart.js (CDN).
Line Chart
Interactive line chart using Chart.js (loaded from CDN). Supports multiple datasets, fill, tension, and grid styling.
Polar Area Chart
Beautiful polar area chart powered by Chart.js.
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Scatter Chart from the Gutenberg inserter.