Chart Shortcode
Each chart has an auto-generated shortcode shown at the bottom of the chart settings panel. The shortcode intelligently selects the best display format based on context.
Shortcode renamed in 2.2
The canonical shortcode is now [m-chart]. The block and admin UI emit [m-chart …], and all examples below use it. The original [chart] shortcode still works as a backward-compatible alias, so existing content keeps rendering unchanged.
Default Behavior
[m-chart id="123"]
By default, the shortcode renders an interactive JavaScript chart. On RSS feeds and AMP pages, it automatically serves a static image instead.
Display Options
show
Controls the output format explicitly.
| Value | Description |
|---|---|
chart | JavaScript chart (the default); falls back to image in RSS/AMP |
image | Always renders a static image |
table | Renders the chart data as an HTML table (available since v1.5) |
Example — force image output:
[m-chart id="123" show="image"]
Example — render as a data table:
[m-chart id="123" show="table"]
share
Displays an embed code box below the chart, allowing visitors to copy the shortcode and embed the chart on their own WordPress site. Requires iFrame Embedding to be enabled in Chart → Settings.
[m-chart id="123" share="show"]
Available since version 1.6.
width
Overrides the chart's default width.
[m-chart id="123" width="600"]
Block Editor
See Block Editor for documentation on embedding charts using the M Chart block.