Chart.js v2.7.0 Release Notes

Release Date: 2017-09-10 // over 6 years ago
  • Version 2.7 brings better stability, and powerful new features to Chart.js. The bubble chart options are now completely scriptable. This means that you can pass a function to a bubble chart dataset property and have the function be called as needed. This simplifies array properties, and allows quick and easy rendering changes based on data values. Check out the sample for details. If these options prove useful, they can be extended to other chart types in the future.

    ๐Ÿ— Building off the time scale rewrite in version 2.6, the time scale now supports options for configuring how labels generate ticks, how interpolation between the points is handled and the scale boundary strategy. Users can now configure ticks to be generated for each label, or be determined automatically from the data limits. Users can also change how ticks are distributed along the axis] to make non-linear time axes. Check out the sample for details.

    ๐Ÿ“š Documentation: http://www.chartjs.org/docs/2.7.0/

    ๐Ÿ’ฅ Breaking Changes

    • โช #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.

    ๐Ÿ—„ Deprecations

    • ๐Ÿ—„ #4401 Deprecated time scale unitStepSize, use stepSize instead.

    ๐Ÿ†• New Features

    โœจ Enhancements

    • โšก๏ธ #4362 Add support for configurable update. Thanks @ricardocosta89
    • 0๏ธโƒฃ #4381 Scatter chart doesn't anymore display lines by default.
    • ๐Ÿ‘ #4382 Add support for multiple lines text in the chart title.
    • ๐Ÿ‘ #4531 Add support for line height CSS values.
    • #4545 New offset scale option. Thanks @nagix
    • โšก๏ธ #4586 Allow updating dataset types. Thanks @benmccann
    • ๐Ÿ‘ #4591 Add support for detached canvas element.
    • #4596 Replace the IFRAME resizer by scrollable DIVs.
    • #4632 Ticks callback is now called with this as scope. Thanks @andig
    • #4708 Add platform fallback implementation.
    • ๐Ÿš€ #4733 Update chartjs-color dependency to version 2.2.0

    ๐Ÿ›  Issues Fixed

    • ๐Ÿ›  #4079 Fixed inconsistent aspect ratio (2 for all charts). Thanks @jtblin
    • ๐Ÿ›  #4249 Fixed labelOffset not working for vertical axes. Thanks @suheb
    • #4295 Fixed missing IE *_SAFE_INTEGER constants. Thanks @OlduwanSteve
    • ๐Ÿ›  #4297 Fixed onHover event not being triggered. Thanks @ricardocosta89
    • ๐Ÿ›  #4318 Fixed disabled legend items alignment.
    • 0๏ธโƒฃ #4319 Fixed default layout options (empty object).
    • ๐Ÿ›  #4341 Fixed tooltip color box border width.
    • ๐Ÿ›  #4348 Fixed time scale round option.
    • ๐Ÿ›  #4360 Fixed filling between datasets of different lengths.
    • ๐Ÿ›  #4402 Fixed error when legend labels option is undefined.
    • #4403 ticks.padding option now applies to vertical and horizontal scales.
    • #4406 Ensured that chart dimensions are always >= 0. Thanks @Peter-Van-Drunen
    • โš  #4424 Fixed non-passive event listener warning in Chrome.
    • ๐Ÿ›  #4425 Fixed range calculation when all datasets hidden and axis minimum set.
    • #4448 Radius is now clamped when drawing rounded rectangle.
    • #4451 Chart area is now clipped before filling.
    • ๐Ÿ›  #4457 Fixed reverse option in radial linear scale.
    • ๐Ÿ‘ #4459 Line chart pointBorderWidth now supports array.
    • #4522 Honour time scale min/max settings. Thanks @andig
    • #4545 Make offsetGridLines consistent. Thanks @nagix
    • ๐Ÿšš #4655 Removed redundant tooltip initialize. Thanks @xg-wang
    • #4682 Show radial scale labels correctly when rotated.
    • ๐Ÿ›  #4697 Fixed filling datasets when stepped line. Thanks @nagix

    ๐Ÿ“š Documentation

    • ๐Ÿ“š #4320 Fixed stepSize documentation (previously unitStepSize).
    • ๐Ÿ›  #4325 Fixed animations link. Thanks @raquelguimaraes
    • ๐Ÿ›  #4353 Fixed typo in labelling. Thank @MuseofMoose
    • ๐Ÿ›  #4365 Fixed typo in title. Thanks @moortaube
    • ๐Ÿ›  #4383 Fixed HighCharts comparison. Thanks @brother
    • #4386 Add note regarding non-existant fonts.
    • ๐Ÿ›  #4404 Fixed wording in line. Thanks @uok
    • โšก๏ธ #4417 Add dataset update plugin hooks. Thanks @nagix
    • โšก๏ธ #4418 Updated the time display format table. Thanks @nagix
    • ๐Ÿ‘ #4442 Better example of using script tag. Thanks @justinledford
    • #4456 Add a note on how to use getElementAtEvent in a click handler.
    • ๐Ÿ“š #4465 Updated link to documentation for previous versions. Thanks @alex-paterson
    • #4527 Add link to Java integration. Thanks @mdewilde
    • #4554 Add a financial time series sample. Thanks @benmccann
    • โž• Add doc about accessing development build and resources. Thanks @andig

    Development

    • โฌ†๏ธ #4272 Upgraded development dependencies. Thanks @benmccann
    • #4346 Switched Travis to use Node 6. Thanks @benmccann
    • #4419 Cleaned up and reorganize core and canvas helpers.
    • ๐Ÿ‘• #4421 Increased ESLint complexity and add config for tests.
    • ๐Ÿ”€ #4422 Rewrote the clone and merge helpers.
    • 0๏ธโƒฃ #4423 Changed valueAtIndexOrDefault behavior.
    • ๐Ÿšš #4427 Removed .js extensions when requiring a file. Thanks @let-aurn
    • ๐Ÿšš #4475 Moved easing effects in separate file + unit tests.
    • ๐Ÿ›  #4477 Fixed many link anchors. Thanks @adrianliaw
    • #4479 Chart.helpers is now importable.
    • ๐Ÿ‘• #4485 Fixed ESLint errors. Thanks @benmccann
    • #4509 Chart.platform is now importable.
    • 0๏ธโƒฃ #4512 Chart.defaults/Ticks/Interaction are now importable.
    • #4540 Chart.Element/elements.* are now importable.
    • ๐Ÿšš #4542 Removed duplicate npm install. Thanks @benmccann
    • ๐Ÿ”จ #4544 Refactored padding parsing in helpers.options.
    • #4547 Enforced spaces around infix/unary words operators.
    • โœ… #4566 Rewrote unit test waitForResize helper.
    • ๐Ÿ’… #4610 Enforced variable declaration coding style.
    • ๐Ÿ”จ #4614 Refactored autoskip functionality into a separate method. Thanks @benmccann
    • โœ… #4617 Fixed tests on OSX with retina screen. Thanks @andig
    • ๐Ÿ‘ #4654 Better CodeClimate integration.
    • โœ… #4698 Improved controller test stability. Thanks @andig

    ๐Ÿš€ More details in the release PR: #4706