chart.js

chart.js breaking-changes badge

chart.js (latest known version: 4.5.1) has 25 known breaking changes on record, each backed by a source URL.

Actively maintainedLatest known version: 4.5.1npm ↗

Security advisories

GHSA-h68q-55jf-x68wHIGH<2.9.4

Prototype pollution in chart.js

source ↗

Recent changes

v4.0.0Breaking

- #10733 Convert the curve helpers to TS - #10728 Convert helpers.extra to TS - #10663 Fix autoskip logic - #10653 Use ticks.steSize instead of time.stepSize on time and timeseries scales - #10646 fix: respect aspect ratio with container height - #10643 feat: remove default axis override when custom id is given - #10612 Remove tooltip constructor fallbacks, \`this.chart\` and \`this.\_chart\` - #9166 Refine logarithmic scaling / tick generation - #10571 Put the border opts in own object - #10548 fix: same-looking tooltips on charts - #10551 Use borderRadius for legend and remove fallbacks - #10591 Change way that linear scales calculate min and max - #10526 feat: sideEffects false - #10549 Remove destroy hook - #10540 fix: pass timestamp to ticks callback - #10525 feat: add ESM support - #10504 fix: treeshaking - #10550 Move parameter of TType in ChartMeta to first option - #10469 Fix offset on doughnut charts

source ↗

v4.0.0-releaseBreaking

Version 4.0.0-release is a semver-major release over 3.9.1, but no breaking change was detected in the release notes text - flagged for manual review.

source ↗

v3.0.0-alphaBreaking

There are many breaking changes in this release of Chart.js. Most will not be noticeable to users as they are in the internals of the chart, or at points where plugins & scales interface with the chart. However, there are changes to the config option format in v3. Most noticeably, `scales` are no longer specified in an array and instead are specified in an object. The [migration guide](https://www.chartjs.org/docs/next/getting-started/v3-migration) provides more details on all of the changes made so far.

source ↗

v3.0.0-alpha.2Breaking

There are many breaking changes in this release of Chart.js in addition to those introduce in the previous `3.0.0-alpha` release. Most will not be noticeable to users as they are in the internals of the chart, or at points where plugins & scales interface with the chart. However, there are changes to the config option format in v3 that will affect all users of Chart.js. Most noticeably, in all alpha releases, `scales` are no longer specified in an array and instead are specified in an object. The [migration guide](https://www.chartjs.org/docs/next/getting-started/v3-migration) provides more details on all of the changes made so far. Major breaking changes since the last alpha release include: * Dist file renamed from `Chart.js` to `chart.js` * `npm` users must `register` the charts, scales, elements, and plugins they wish to use (#7435) * Time scale split into `time` and `timeseries` scales (#7525) * Indexable options will now loop (#7442) rather than holding the last value * Horizontal bar tooltip mode is now `'nearest'` to match vertical bar charts. #7488 * Line chart tension now defaults to 0 (#7386) * Horizontal bar chart type was removed in favour of new `indexAxis` concept. #7514 * Scale ticks are now generated from smallest to largest. #7559 * TooltipItem model changed to include data point. `value` renamed to `formattedValue`. (#7618)

source ↗

v3.0.0-beta.2Breaking

The helpers are now exposed in a flat format for both UMD & ESM cases. See #7750 for details.

source ↗

v3.0.0-beta.4Breaking

- #7886 Shorten alignment settings for axes - #7871 Polar Area `elements.arc.angle` option now returns degrees - #7843 Provide method to lookup a chart from a canvas - #7833 Enable per-dataset circumference and rotation for pie/doughnut charts

source ↗

v3.0.0-beta.5Breaking

- #7989 Delay resize to just before draw when animating - #7979 Relocate dataset defaults to defaults.controllers - #7949 Add \`args.mode\` to before/after update plugin hooks - #7936 Rename showLines to showLine - #7924 Rename elements to mark as elements, i.e. Arc -> ArcElement - #7900 Document `getElementsAtEventForMode` and remove APIs that can be replaced by it

source ↗

v3.0.0-beta.6Breaking

- #8017 Remove I prefix from TS types

source ↗

v3.0.0-beta.7Breaking

- #8111 LineElement: no fill by default - #8102 Unify signature of plugin hooks - #8089 Move title, tooltip and legend to options.plugins - #8090 Restore \`datasets\` namespace (revert 6955) - #8066 Align font options with CSS - #8074 Rename uppercase types to camel case - #8062 Unify cartesian scale tick order - #8009 Drop legacy browser support

source ↗

v3.0.0-beta.8Breaking

- #8248 Skip reset when animations are disabled - #8223 Remove duplicate Scriptable definitions - #8215 Add options to configure tick styling independent of grid lines

source ↗

v3.0.0-beta.10Breaking

- #8356 Update type map names - #8358 Rename LayoutItem.fullWidth to fullSize

source ↗

v3.0.0-beta.11Breaking

- #8318 Add raw data to context and rename dataPoint to parsed - #8332 Isolate properties / modes from animation options - #8437 Round canvas size to 0.1px resolution - #8374 Option resolution with proxies - #8393 Remove options.scale, in favor of options.scales.r

source ↗

v3.0.0-beta.12Breaking

- #8523 rename tooltip.custom property to tooltip.external - #8521 Remove unused getRingIndex from Doughnut - #8514 Rename cutoutPercentage to cutout + chores - #8493 Merge tooltip padding settings - #8466 Stop reading fixedStepSize from tick options

source ↗

v3.0.0-beta.13Breaking

- #8563 Relocate chart type and dataset type defaults - #8576 Rename scaleLabel to title in scale options

source ↗

v3.0.0-beta.14Breaking

- #8650 Use maxOverflow as minimum layout padding - #8633 Radial scale point label backdrop color - #8630 Radial: min 1/2 of the max radius as chartArea - #8629 Change default autoSkipPadding to 3 - #8628 Rename scale \`gridLines\` options to be clearer - #8627 Scale: autoSkip before fit - #8608 helpers.curve cleanup - #8593 Move startAngle to scale options - #8588 Expose radial scale point label positions

source ↗

v3.0.0Breaking

Version 3.0.0 is a semver-major release over 2.9.4, but no breaking change was detected in the release notes text - flagged for manual review.

source ↗

v3.0.0-rcBreaking

- #8657 Update tick positioning

source ↗

v3.0.0-rc.7Breaking

- #8770 Remove line interaction overrides + hover.onHover

source ↗

v2.9.0Breaking

- https://github.com/chartjs/Chart.js/pull/6131 `helpers._decimalPlaces` is now private

source ↗

v2.7.0Breaking

- #4079 Doughnut, polarArea and radar charts aspect ratio changed to `2` to be consistent with other charts and are not square anymore by default. Use the `aspectRatio: 1` option to restore the previous behaviour.

source ↗

v2.6.0Breaking

* #3782 The `lineArc` setting for the radial linear scale has been removed and replaced by `gridLines.circular` and `pointLabels.display`. * #4044 The bar controller internals has been refactored, therefore custom chart types that extend from the bar controller will need to be updated. More details can be found in this [PR](4044).

source ↗

v2.5.0Breaking

- #3570 Removed unused `Chart.helpers.cancelAnimFrame` method. - #3669 `onHover` callback now has 3 parameters. The 2nd parameter is the event that triggered the hover. This was done for consistency with the `onClick` callback.

source ↗

v2.4.0Breaking

- #3356 The default aspect ratio is now correctly applied, meaning that polar, doughnut and radar charts are now rendered with an aspect ratio of 1 (square). The old behavior can be obtained by globally changing the default `aspectRatio` for each chart type (e.g. `Chart.defaults.doughnut.aspectRatio = 2`).

source ↗

v2.0.0Breaking

Version 2.0.0 is a semver-major release over 1.1.1, but no breaking change was detected in the release notes text - flagged for manual review.

source ↗

v1.0.0-betaBreaking

Version 1.0.0-beta is a semver-major release over 0.2.0, but no breaking change was detected in the release notes text - flagged for manual review.

source ↗

Check what changed for chart.js since your installed version, live.

Open the playground →