Version 2.7.0
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 theaspectRatio: 1
option to restore the previous behaviour.
Deprecations
- #4401 Deprecated time scale
unitStepSize
, usestepSize
instead.
New Features
- #4199 Add tooltip
labelTextColor
callback. Thanks @apoorvasrinivasan - #4267 #4268 New time scale
major
unit options. Thanks @hurskiy-andriy - #4270 New
devicePixelRatio
option. Thanks @OlduwanSteve - #4646 Implemented scale label padding. Thanks @andig
- #4456 Allow specifying bar chart via {x, y} data points. Thanks @benmccann
- #4458 Add interaction
axis: 'x', 'y', 'xy'
options. - #4506 Allow category labels definition at scale level. Thanks @andig
- #4507 New time scale
distribution
andticks.source
options. - #4533 Allow specifying the time axis via t attribute. Thanks @benmccann
- #4556 New time scale
bounds
option. - #4671 Introduced scriptable options (bubble chart only).
Enhancements
- #4362 Add support for configurable update. Thanks @ricardocosta89
- #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 withthis
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.
- #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 (previouslyunitStepSize
). - #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.
- #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. - #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