Skip to content

Version 2.4.0

Compare
Choose a tag to compare
@chartjs-ci chartjs-ci released this 12 Nov 17:58
· 626 commits to release since this release

This version focuses on improving the interactivity of Chart.js. We have new and improved modes for interacting with the graph. For instance, you can now highlight the nearest item easily. It is also easy to define your own tooltip modes with a few simple functions. See all the new modes in the docs. Data animations when adding and removing data have been improved: points now animate in cleanly by default.

Breaking Changes

  • #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).

New Features

  • #3201 Expose data points info for custom tooltip. Thanks @bydooweedoo
  • #3400 New tooltip and hover interaction modes.
  • #3411 New displayColors option to turn off tooltip color boxes.
  • #3453 New tooltip average and nearest positioning modes.
  • #3460 New line chart fill modes.
  • #3472 Add new caretX and caretY properties to tooltip point.
  • #3474 Charts can now be created from the canvas id.
  • #3476 Layout service now supports configurable padding.
  • #3477 New method to reset() the chart to its initial state.
  • #3494 New tooltips.filter option to filter tooltip items.

Enhancements

  • #3281 Better number formatting for the radial linear scale.
  • #3326 Make charts vertically responsive.
  • #3364 Inject iframe for responsive charts only.
  • #3399 Better animation when adding or removing data.
  • #3400 Improve tooltip and hover Interactions.
  • #3411 Display tooltip color boxes for all tooltips.
  • #3417 Expose the drawBackground tooltip method. Thanks @mjeanroy
  • #3468 Bar chart performance improvements.
  • #3504 Reorganize, cleanup and enhance samples.
  • Update installation instructions in README.

Issues Fixed

  • #3133 Skip non finite data points when determining scale sizes. Thanks @bcongdon
  • #3323 Fix the legend drawing when labels.usePointStyle is true.
  • #3324 Compute correct tooltip size when there is no title present.
  • #3325 Specifically handle multiline strings for doughnut charts.
  • #3341 Fix scale documentation.
  • #3356 Fix initial aspect ratio when not responsive.
  • #3356 Fix radar default aspect ratio and samples.
  • #3357 Fix documentation typos. Thanks @kant
  • #3358 Fix title overflow by using maxWidth fillText() argument. Thanks @dylan-kerr
  • #3361 Fix HTML legend string for polar area charts to match doughnut charts.
  • #3409 Generate ticks using only min, max and stepSize when all specified. Thanks @fewstera
  • #3421 Fix bubble chart tooltip callback to use correct labels.
  • #3443 Properly merge colors for the tooltip labels.
  • #3444 Fix documentation comparison table "check" character. Thanks @tiesont
  • #3446 Fix tooltip caret position.
  • #3450 Fix options.events option merging.
  • #3474 Prevent exception when an invalid canvas/context/id is provided.
  • #3490 Add missing tick autoSkipPadding option documentation. Thanks @bretjb
  • #3516 Fix a documentation typo. Thanks @varatep
  • #3522 Fix code and documentation typos. Thanks @jsoref
  • #3527 Fix iframe resize handler when re-attached to DOM.
  • Move reverse option for labels to correct section in docs.

Development

  • #3281 Refactor ticks generators and formatters.
  • #3356 Gulp command switch to run specific test files.
  • #3414 Fix NPM watchify dependency. Thanks @fewstera
  • #3473 Extend ESLint to unit test.
  • #3526 Bump ESLint to v3.x.

More details in the release PR: #3551