You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chart.js 3.0 introduces a number of breaking changes. Chart.js 2.0 was released in April 2016. In the years since then, as Chart.js has grown in popularity and feature set, we've learned some lessons about how to better create a charting library. In order to improve performance, offer new features, and improve maintainability, it was necessary to break backwards compatibility, but we aimed to do so only when worth the benefit. Some major highlights of v3 include:
Large performance improvements including the ability to skip data parsing and render charts in parallel via webworkers
Additional configurability and scriptable options with better defaults
In this issue we'll maintain a list of committed, nice-to-have, and proposed features for v3. Feedback from the community will help shape the prioritization for v3.
Remove moment from package.json (Remove moment from dependencies #6745), move the moment adapter to an external project, and remove the rollup optional plugin
Split _options out of _model. Creating _model is expensive right now, since it's done for each data point. However, _options does not need to be recreated for each data point unless scriptable options are being used. Thus by just using _options directly instead of copying it into _model we would be much more performant (Rewrite animation logic #6845)
Ensure user-specified options are applied after defaults. Delete _config and have just a single object holding resolved options (Option resolution with proxies #8374)
Make chart.options private and immutable (user should not directly edit, but should pass in new config to merge)
Consider removing data from config so that we have datasets, labels, and options as first level properties. We agreed that data.datasets.data is confusing, but every chart would need to be updated if we changed this and all StackOverflow answers would be outdated
How can you help?
Provide feedback on which issues you would like prioritized for v3
Test out alpha & beta releases as they become available. The alpha release is quite stable though we have found a few issues. Thanks to the folks that reported them! Here's a list of known issues
3.0 final is available
We're proud to announce that Chart.js 3.0.0 is now available. Get it with
npm install --save chart.jsOverview
Chart.js 3.0 introduces a number of breaking changes. Chart.js 2.0 was released in April 2016. In the years since then, as Chart.js has grown in popularity and feature set, we've learned some lessons about how to better create a charting library. In order to improve performance, offer new features, and improve maintainability, it was necessary to break backwards compatibility, but we aimed to do so only when worth the benefit. Some major highlights of v3 include:
In this issue we'll maintain a list of committed, nice-to-have, and proposed features for v3. Feedback from the community will help shape the prioritization for v3.
Committed Features
Rollup configured for ES6+ babel translation (Add babel plugin for rollup & transform code #6555)Removecustom(Remove undocumented "custom" feature #6605)grep -ri backward srcstill returns a handful of results. Also need to search the code for TODOsPrefix all private methods with underscoreMake ticks objects (Consider making ticks objects #5019)(or not? should we revert? see Remove ticksToTimestamps and change ticks to numbers #6791)Removemomentfrompackage.json(Remove moment from dependencies #6745), move the moment adapter to an external project, and remove the rollup optional pluginRemovezeroLineIndexfeature and replace with function based axis properties (Remove zeroLineIndex functionality #6697 & Allow functions to be specified for scale grid line options #6700)Change, adopt ES6 classes, userequiretoimportconst/let, etc.Change axis options from an array to an object keyed by ID (Convert axis options from arrays to objects #6773)CleanupgetPixelForTick(getPixelForTick is confusing and possibly inconsistent #6715)Accept data in a format that doesn't require parsing (Consider new format for passing data in #6696)Improve performance of finding hovered element (Improve hover performance #6716)Split_optionsout of_model. Creating_modelis expensive right now, since it's done for each data point. However,_optionsdoes not need to be recreated for each data point unless scriptable options are being used. Thus by just using_optionsdirectly instead of copying it into_modelwe would be much more performant (Rewrite animation logic #6845)Reduce number of objects created (e.g._viewand_model) when animation is disabled (e.g. Performance optimizations when animations are disabled #6710).MakebeginAtZerodefault betruefor bar chart (Change scale.beginAtZero default to true #5939)remove(Global datasets options thought #6684 Remove global from defaults #6893)globalfrom options namespaceStandardize on using degrees for angles (Polar area: startAngle in degrees, 0 at top. #6936)Migrate docs from GitBook to Docusaurus (Migrate from GitBook to Docusaurus #7295)Support tree shaking / individual module imports (v3: consider changing export logic for esm modules #7371)RemovehorizontalBarand make all charts capable of being horizontal (Replace horizontalBar with indexAxis: 'y' #7144)Proposed / Nice to Have Features
options.scalesandoption.scalekeys for all chart typesRemove overrides of_resolveDataElementOptionsand_resolveDatasetElementOptions(Option resolution with proxies #8374)Make_dataElementOptionsan array in all controllers (i.e. line and radar). (Option resolution with proxies #8374)Ensure user-specified options are applied after defaults. Delete_configand have just a single object holding resolved options (Option resolution with proxies #8374)chart.optionsprivate and immutable (user should not directly edit, but should pass in new config to merge)Cleanup interactions options (Add interaction options #7922)labelto axistitleto differentiate from the tick labelsWon't do
datafrom config so that we havedatasets,labels, andoptionsas first level properties. We agreed thatdata.datasets.datais confusing, but every chart would need to be updated if we changed this and all StackOverflow answers would be outdatedHow can you help?