Chart.js v3.0.0-alpha.2 Release Notes

Release Date: 2020-07-17 // almost 4 years ago
  • Essential Links

    Highlights

    ๐Ÿš€ The main highlight of this second 3.0.0 alpha release is the introduction of tree shaking. When using a bundler, such as Rollup or Webpack, the bundler can now remove unused charts, scales, and plugins from your code to result in a smaller bundle being delivered to the end user.

    ๐Ÿ’ฅ Breaking Changes

    ๐Ÿš€ 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 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
    • 0๏ธโƒฃ 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)

    โœจ Enhancements

    • #7618 Tooltip: add dataPoint and rename value to formattedValue
    • #7603 Align the tooltip callbacks parameters with scriptable options
    • ๐Ÿ”Œ #7590 PluginService using registry
    • #7579 Pass context parameter to custom tooltip
    • #7570 Enable autoSkip for time scale to match others
    • #7559 Generate ticks from small to large
    • #7556 Add parameters to tooltip filter option
    • #7538 Add normalized option
    • #7525 Split time scale into time and timeseries
    • #7520 Consistently resolve element options
    • #7514 Replace horizontalBar with indexAxis: 'y'
    • #7499 Use consistent option context for scales
    • ๐Ÿ“œ #7489 Parse from custom properties in data
    • โšก๏ธ #7487 Update horizontal bar chart default tooltip mode
    • #7471 Radial scale scriptable options
    • #7449 Radial Linear Scale: Compute Value based on distance from center
    • #7442 Make indexable options looping
    • 0๏ธโƒฃ #7414 Default aspectRatio to 1 for square charts
    • 0๏ธโƒฃ #7386 Turns off interpolation per default. Thanks @sebiniemann
    • #7383 Move font* to font.*
    • ๐Ÿ‘ #7335 Better formatting of large tick values

    ๐ŸŽ Performance

    • ๐ŸŽ #7234 Address bar chart performance regression

    ๐Ÿ› Bug Fixes

    • โšก๏ธ #7634 FloatBar: update range only for value scale
    • #7629 Animation events sanity
    • 0๏ธโƒฃ #7628 Leftover defaults
    • ๐Ÿšš #7626 Move register/unregister to core.controller
    • #7625 Fix remaining issues in samples
    • #7622 Fix category scale tick placement with autoSkip
    • ๐Ÿ›  #7617 Registry fixes
    • #7612 Enable removing of line from radar charts
    • ๐Ÿ“š #7609 Update API documentation
    • #7608 Registry bugs
    • #7573 Use all timestamps for calculating offsets
    • #7572 Fix padding for labels
    • #7565 Fix tooltip caret border when caret is on right or bottom
    • โšก๏ธ #7528 Update the legend object during beforeUpdate
    • #7522 Tooltip: Provide argument for custom callback
    • #7511 Fix initial animations
    • #7502 Read Title font options from correct place
    • โšก๏ธ #7469 Update tooltip when the display position changes
    • #7468 Stacked scatter chart
    • ๐Ÿšš #7458 Remove data checks and always re-parse data
    • 0๏ธโƒฃ #7453 Implement routing of defaults
    • 0๏ธโƒฃ #7446 Radar charts should fill to the center by default
    • #7438 Arc: Stop drawing anything when hidden
    • #7421 Consider all timestamps for bar measuring
    • #7411 Only draw the tooltip if it is defined
    • ๐Ÿ‘ #7410 Legend onClick callback supports arrow functions
    • #7398 Correctly determine min/max for Float Bar
    • #7381 Preserve object prototypes when cloning
    • #7380 Use full URL for TypeDocs
    • #7375 Use correct index when resolving bubble options
    • #7370 Delay animations until attached
    • ๐Ÿ”Œ #7360 Use @rollup/plugin-inject for ResizeObserver poly
    • #7350 Detect data modifications with equal values
    • #7349 When the container padding is an empty string, handle it as 0px
    • #7346 Add a scale.init method
    • #7298 Fix chart resizing issue. Thanks @yhvicey
    • #7293 Check for destroyed charts when handling throttled DOM events
    • #7269 Use isoWeekday when rounding
    • ๐ŸŒฒ #7242 Fix overlapping ticks on log scale
    • #7224 Fix event position in shadow DOM
    • #7211 Fix filterBetween
    • โšก๏ธ #7196 Update running animations

    ๐Ÿ“š Documentation

    • #7638 Fix tooltip in financial sample
    • ๐Ÿ“š #7631 Removes the line height property from title documentation. Thanks @stockiNail
    • ๐Ÿ“š #7624 Align axes documentation with the changes
    • #7623 Fix links to fonts.md
    • ๐Ÿšš #7620 Move registration migration guide to user migration section
    • #7595 Fix errors in custom tooltip samples
    • ๐Ÿ“š #7592 Tooltip Model documentation sounds not correct. Thanks @stockiNail
    • #7584 The hover* options of bar chart doc page change as scriptable. Thanks @stockiNail
    • โšก๏ธ #7581 Grammar updates to the description on the homepage. Thanks @JohnMHoyt24
    • ๐Ÿšš #7562 Remove "for bugs" from bug issue template
    • โšก๏ธ #7558 Update time scale docs to be Moment agnostic
    • #7557 Fix typo in sample
    • #7552 Fix financial sample
    • ๐Ÿšš #7536 Move timeseries fixtures to their own directory
    • #7530 Mark parameter as optional
    • ๐Ÿšš #7508 Remove lineHeight property from LegendTitle doc. Thanks @stockiNail
    • ๐Ÿ“„ #7484 Fix link to animations docs
    • ๐Ÿšš #7477 Remove lineHeight property from ScaleTitle. Thanks @stockiNail
    • #7451 Indicate that axis callbacks are at top level of options
    • โšก๏ธ #7447 Update doc samples for changed file name
    • ๐Ÿ“š #7437 Remove missing setDataVisibility for documentation
    • 0๏ธโƒฃ #7405 Docs: fix z-index default
    • ๐Ÿ— #7400 ESM build, with helpers separated
    • #7399 Document the context properties for ticks
    • ๐Ÿ“š #7384 Small update to animation documentation
    • #7377 Add a JSDoc for _dataCheck
    • ๐Ÿ“š #7358 Developer migration documentation
    • #7348 Fix broken links to contributor's guide
    • ๐Ÿ—„ #7334 Document the removal of deprecated properties
    • ๐Ÿ“„ #7329 Add Algolia to docs. Thanks @s-pace
    • โฌ†๏ธ #7327 Upgrade the contributing guide for Docusaurus
    • #7315 Improve Docusaurus URLs
    • #7295 Migrate from GitBook to Docusaurus
    • #7275 Make br tags self-closing
    • ๐Ÿ“„ #7274 Clarify that API docs are generated by TypeDoc
    • #7263 Fix typo, layed -> laid. Thanks @timgates42
    • ๐Ÿ“š #7245 Update introduction documentation. Thanks @eniovalo
    • #7218 Improve migration guide for innerRadius/outerRadius

    Development

    • ๐Ÿšš #7568 Remove duplicate tests
    • ๐Ÿšš #7521 Remove babel from tests
    • #7498 Relocate array utils to helpers.collection
    • ๐Ÿšš #7494 Remove unused _scaleStacked cache
    • #7492 Fix measureText bug in spriting
    • โœ… #7491 Replace ineffective test with a fixture
    • โช #7481 Restore Set to arrayUnique
    • ๐Ÿšš #7480 Remove unused parameter
    • โœ… #7470 Do not show legend in stacked scatter test
    • ๐Ÿ’… #7467 Cleanup Event Handling code to match style of tooltip plugin
    • ๐ŸŽ #7452 Babel loose mode for improved performance
    • ๐Ÿ— #7445 Use verbose build in dev mode
    • ๐Ÿšš #7441 Remove unused dependency
    • ๐Ÿ”จ #7440 Clean lint errors from samples by refactoring
    • #7439 Cleanup resize complexity
    • #7436 Consistency: Use lower case for instances
    • ๐Ÿ”Œ #7435 Generic registry for controllers, scales, elements and plugins
    • โœ… #7426 Alter test to require fewer iterations
    • ๐Ÿšš #7425 Remove proposal and obsolete features
    • #7402 Gulp toolchain ported to npm scripts.
    • #7416 Rename dist/Chart* to dist/chart*
    • โœ… #7392 Run tests in series to avoid timeouts
    • 0๏ธโƒฃ #7391 Rename platform/platform to index removing default
    • #7390 Add index to core
    • ๐Ÿšš #7389 Remove default export from plugins/index
    • ๐Ÿšš #7388 Remove default export from controllers/index
    • #7385 Use direct imports instead of generic helpers import. Thanks @sgratzl
    • ๐Ÿ‘ #7345 Better organize calls in main controller
    • ๐Ÿšš #7333 Remove unused bar property and confusing docs referring to it
    • โฌ†๏ธ #7317, #7463, #7486 Upgrade dependencies
    • ๐Ÿšš #7314 Remove old docs from gitignore
    • #7294 Finish removing bower
    • #7268 Fix couple of small issues
    • ๐Ÿšš #7265 Remove bower. Thanks @nainardev
    • ๐Ÿšš #7264 Remove unused layout.defaults
    • โšก๏ธ #7233 Update dependencies
    • ๐Ÿšš #7229 Remove unused method parameter
    • #7225 getPixelForTick cleanup
    • #7212 Cleaner handling of fitting no ticks
    • ๐Ÿ— #7208 Only polyfill ResizeObserver for UMD builds