M ChartM Chart
Users
Highcharts
Developers
Download
GitHub
Users
Highcharts
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
    • Chart Shortcode
    • Block Editor
    • CSV Import & Export
    • Settings
    • Chart Units
    • Themes
    • Duplicating Charts
    • Example Charts

Boxplots & Violin Charts

Boxplots and violin charts both visualize how a set of values is distributed across one or more categories. A boxplot draws the classic five-number summary — minimum, first quartile, median, third quartile, maximum — plus outliers. A violin chart replaces the box with a kernel-density-estimate silhouette so the shape of the distribution (skew, bimodality, clustering) is visible.

The two types share the same data format, the same multi-sheet handling, and the same display options. You can switch between them at any time using the chart's Type dropdown — your data and settings carry over.

Chart.js library required

Boxplot and Violin charts are rendered by a Chart.js plugin and only work when M Chart is set to use Chart.js as its library. If your site is currently set to Highcharts, switch in Settings before creating one of these chart types.

Data Format

Both types take raw observations as input. Each row is one category, with the category label in the first column and every observation for that category in the cells to its right. Row length can vary — empty cells are simply skipped.

Class A72818891957684
Class B657078828873
Class C8085879092959899

Raw observations only

M Chart passes your individual values to the rendering library, which computes the five-number summary (and the violin's density estimate) automatically. Pre-computed Q1, median, and Q3 values are not supported as input — type or paste in the underlying observations.

Multiple Datasets

Boxplots and violin charts both support multiple sheets. Each sheet becomes a parallel dataset rendered alongside the others on the same category axis, with the sheet name appearing in the legend.

Sheet 1 (2024):

Class A7281889195
Class B6570788288

Sheet 2 (2025):

Class A7584899296
Class B6873808590

First sheet drives the categories

The category labels on the x-axis come from the first sheet only. Keep the first column identical and in the same order across every sheet — otherwise later sheets' rows won't line up with the labels visitors see.

Display Options

These appear in the Chart meta box for boxplot and violin charts:

  • Show mean point — when on, each box or violin shows a small dot at the dataset mean. On by default.
  • Show sample points — when on, each individual observation is rendered as a dot overlay. Off by default.
  • Color per data point — only available with a single sheet. With multiple sheets each dataset already gets its own palette color and the toggle is hidden.

Boxplot vs. Violin

Use a boxplot when you want a compact summary of where the bulk of the data sits — the box covers the middle 50%, the whiskers extend to the extremes, and any outliers show up as isolated dots. Boxplots are at their best when comparing many categories at once.

Use a violin when the shape of the distribution matters: whether values cluster around one mode or two, whether the distribution is skewed, whether there are gaps. Violins need more observations per row than boxplots do to look meaningful — with only a couple of values they collapse to a thin line.

Limits and gotchas

  • Empty observation cells are skipped silently — variable-length rows are fine.
  • Cells that don't parse as a number are skipped silently.
  • Rows with a blank category cell are skipped.
  • Sheets with no usable observations are dropped from the chart.
  • Each sheet's prefix and suffix (currency, %, units) are taken from its first parsed observation only — mixing units within a single sheet won't work.
  • With only one or two observations per row, both types render degenerately: a thin line for violin, a near-empty box for boxplot.
  • The KDE bandwidth used for violin charts is calculated using the library's built in formula which is a hybrid of Scott's rule and Silverman's rule of thumb
Last Updated: 5/15/26, 4:54 PM
Contributors: Jamie Poitra
Prev
Treemap Charts
Next
Chart Shortcode