Skip to content

Upgrading chart.js 2 to 3

Breaking2.9.4 → 3.9.1Breaking5New56Changed55Fixed203Other184

Fetching 47 releases from GitHub…31 / 47
BreakingUpgrade verdict

5 breaking changes.

  • Scatter charts no longer include a line element by default.
  • TypeScript definitions no longer include offscreen canvas types.
  • The chart.scale property is gone because it never held a value.
  • Charts can no longer customize line hover behavior through the old interaction overrides or the onHover hover callback.
Top 3 of 5 that need code or config changes

chart.js publishes official migration guides for versions 3, 3. They cover more than the release notes do.

Migration guide ↗Migration guide ↗

Drops chartjs-color, moment.

Installs 0 packages in all (was 6).

Breaking5
Removes the line element from the scatter controller.
scatter
Removes offscreen canvas types.
Removes the chart.scale property, which was always undefined.
chart.scale
Removes line interaction overrides and the hover.onHover option.
hover.onHover
Updates tick positioning, changing where axis ticks are placed.