M ChartM Chart
Users
Pro
Developers
Download
GitHub
Users
Pro
Developers
Download
GitHub
  • User Guide

    • User Guide
    • Libraries
    • Types of Charts
    • Creating a Chart
    • Multiple Sheets
    • Scatter & Bubble Charts
    • Radar & Radar Area Charts
    • Treemap Charts
    • Boxplots & Violin Charts
    • Venn & Euler Charts
    • Chart Shortcode
    • Block Editor
    • CSV Import & Export
    • Settings
    • Chart Units
    • Themes
    • Accessibility
    • Duplicating Charts
    • Example Charts

Chart Units

Chart Units let you label a chart's axes with consistent unit names: USD, Tonnes, Visitors, Percent, and so on. The unit you pick appears alongside (or as) the axis title on the rendered chart, so readers immediately know what the numbers mean.

Units are stored as a standard WordPress taxonomy named Chart Units, attached to the Charts post type. The taxonomy is hierarchical: parent terms are groups (Money, Time, Length, …) and child terms are the units the user can actually pick (USD, Seconds, Meter, …). The plugin ships with a set of common groups and units out of the box, and you can add your own at any time.

Default groups

M Chart creates these groups when the plugin is activated. It creates them again when the chart edit screen opens and no unit has a group yet:

GroupUnits
TimeSeconds, Minutes, Hours, Days, Weeks, Months, Quarter, Years, Decades, Centuries
MoneyUSD, EUR, GBP, JPY, CNY
LengthInch, Foot, Yard, Mile, Millimeter, Centimeter, Meter, Kilometer
WeightTonnes, Tons, Kilograms, Grams, Milligrams, Pounds, Ounces
OtherPercent
Website/TrafficVisitors, Unique Visitors, Clicks, Referrers, Active Users, Pages
SalesUnits, CPM

You don't have to use any of these. They are starting points. You can rename or delete them from the admin like any other WordPress term. Reactivating the plugin recreates any default group or unit that is missing, matched by name. A deleted default comes back. A renamed one gets a fresh copy under the original name.

If a chart export has unit slugs but no term definitions, the importer creates each unit as a top-level term with no group. When the plugin is next activated, or the chart edit screen opens while no unit has a group, M Chart creates the default groups. It then moves default units into them by exact name and leaves other units where they are.

Adding new units

  1. In the WordPress admin, open Charts → Chart Units.
  2. To add a unit: fill in the Name field, pick the parent group from the Parent Chart Unit dropdown, and click Add New Chart Unit. The slug can be left blank — WordPress derives it from the name.
  3. To add a new group: fill in the Name field, leave Parent Chart Unit set to None, and click Add New Chart Unit. A top-level term with no parent becomes a new group that other units can be nested under.

A top-level term with nothing nested under it is listed in the Units dropdown under Other. This lets you pick a unit created without a group, or one added by an import. It turns into a group as soon as a unit is added beneath it. Within each group the units are listed alphabetically.

Group order

Groups appear in the chart Units dropdown alphabetically. Name them with that in mind if ordering matters.

Applying units to a chart

The unit pickers live in the Chart meta box on the chart edit screen, in the same row as each axis title field:

  1. Open a chart for editing.
  2. Find the Vertical axis title and Horizontal axis title rows in the chart settings panel.
  3. Each row has a Units dropdown next to the title field. Pick the unit that matches the axis's values.

The dropdown lists the units under their group name. Only units can be picked. The group names are labels, not choices. Choose N/A to clear the unit.

When the chart renders:

  • If you also filled in the axis title, the unit appears in parentheses after it: a chart with Vertical axis title = Yield and Units = Tonnes/hectare renders the y-axis label as Yield (Tonnes/hectare).
  • If the axis title is blank, the unit name is the axis label.

Listing charts by unit

Each unit has a public archive page at /m-chart-units/<slug>/ that lists every published chart using that unit. For example, https://example.com/m-chart-units/usd/ shows all charts measured in US dollars. Developers can query charts by unit in code. See Chart Units Taxonomy in the developer docs.

Limits and gotchas

  • Units only apply to chart types that have axes — bar, column, line, area, scatter, bubble, treemap (no axes; dropdown hidden), boxplot, violin, etc. On pie, doughnut, radar, radar area, and polar charts there are no x/y axes, so the Units row doesn't appear in the chart settings.
  • Custom units survive plugin updates — they're standard WordPress terms stored in your site's database.
  • The unit name shown on the chart is whatever you type into the term's Name. If you need different display text for one chart, the cleanest workaround is to leave Units set to N/A and put the unit text directly into the axis title field.
  • Treemap renders the rectangles' value prefix/suffix from each row's data cell (e.g., $4500, 2200kg), not from this taxonomy. The Units dropdown isn't shown for treemap charts.
Last Updated: 11/7/26, 6:48 PM
Contributors: Jamie Poitra
Prev
Settings
Next
Themes