Releases: chartjs/Chart.js
v3.0.0-beta.4
Essential Links
Breaking Changes
- #7886 Shorten alignment settings for axes
- #7871 Polar Area
elements.arc.angle
option now returns degrees - #7843 Provide method to lookup a chart from a canvas
- #7833 Enable per-dataset circumference and rotation for pie/doughnut charts
Enhancements
- #7886 Shorten alignment settings for axes
- #7870 Ability to toggle individual bar visibility
- #7874 Cartesian axis label cross alignment
- #7846 Cartesian axis text alignment
- #7862 beginAtZero support for logarithmic
- #7852 Add maxWidth/maxHeight options for legend
- #7849 Add new option,
skipNull
to bar charts that enables skipping null values - #7851 Enable custom sorting of the legend items
- #7845 Provide APIs to set active (hovered) and tooltip elements.
- #7843 Provide method to lookup a chart from a canvas
- #7833 Enable per-dataset circumference and rotation for pie/doughnut charts
Bugs Fixed
- #7848 Limit pixel values further to 16bit integer range
- #7837 Clone cached options if enableOptionSharing!=true
- #7836 Use full height for fullWidth box when left/right
Types
- #7841 Remove enum types
Documentation
- #7875 docs: Grammar fixes for cartesian and radial docs
- #7868 Update custom tooltips to work with multiple charts on a page
- #7865 Add tooltip positioning sample
- #7835 Fix tooltip font options in sample
Development
- #7882 Ensure scripts are marked as executable in git
- #7872 Fix typo in const name
- #7847 Normalize context creation for option resolution
- #7844 JS test files should have tabs to correctly lint
Thanks to @emmcbd, @etimberg, @kurkle, @mikos and @tonyjmartinez
v3.0.0-beta.3
v3.0.0-beta.2
Essential Links
Highlights
The main highlight of this 2nd beta release is improvements to the 1st party Typescript types. Feedback on these types is greatly appreciated.
Breaking Changes
The helpers are now exposed in a flat format for both UMD & ESM cases. See #7750 for details.
Enhancements
- #7768
isoWeekday
time options on time scale as number. Thanks @stockiNail
Performance
Bug Fixes
- #7820 Make dataset animations obey chart level disable
- #7816 Fix: maximum size and mouse position with styling
- #7808 Fix: Update/draw only visible -regression
- #7800 Limit pixel values to 32bit integer range
- #7792 Fix: relative position in FF
- #7790 Better error message when importing charts incorrectly. . Thanks @Lautarourtiaga
- #7785 Fix hover-out regression
- #7758 Fix: update chart when attached
- #7747 Reduce code duplication and sort generated ticks
Types
- #7812 Minor type fixes. Thanks @emmcbd
- #7791 Strong typings for scales and datasets in options. Thanks @emmcbd
- #7783 Merge Chart instance with Chart factory. Thanks @xr0master
- #7782 Strong chart object and properties typing. Thanks @emmcbd
- #7778 parsing is not part of
IChartData
- #7770 fix a wrong Option infer. Thanks @xr0master
- #7767 Improve generic chart type + allow data changing on existing charts. Thanks @xr0master
- #7759 Improve unknown data point types + other type fixes. Thanks @emmcbd
- #7748 Fix invalid TypeScript type. Thanks @sgratzl
Documentation
v3.0.0-beta
Essential Links
Highlights
The main highlight of this first 3.0.0 beta release is the introduction of 1st party Typescript types. Feedback on these types is appreciated.
Enhancements
- #7695 'stack' mode for filler
- #7691 Add offset option for arc
- #7668 TypeScript types. Thanks @sgratzl
Bug Fixes
- #7732 Use offsetX/Y or layerX/Y for events when available
- #7731 Fix shared option handling
- #7717 Resize on devicePixelRation changes
- #7711 Use interpolation in fill: 'stack' (and fix interpolation)
- #7710 Make sure bezier control points are updated
- #7699 Doughnut controller overrides
getLabelAndValue
- #7650 Export extensible classes in ESM compatible way
- #7686 Include
Chart.defaults
always - #7674 Resolve fonts through options.font
- #7649 Do not use line defaults in legend
Documentation
- #7741 Color the scales of multi-axis scatter sample
- #7733 Refer to master documentation for Contributing
- #7718 Document .getElementsAtXAxis(e). Thanks @Ludar-Pavel
- #7685 Add some additional info and sections to animation documentation. Thanks @stockiNail
- #7677 Fixed default of tension property of line element
- #7670 Fix casing of dist files in docs
- #7659 Live demo in getting-started page
- #7658 chart should live in own container
- #7653 Fix import statement in docs
v3.0.0-alpha.2
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
tochart.js
npm
users mustregister
the charts, scales, elements, and plugins they wish to use (#7435)- Time scale split into
time
andtimeseries
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 - 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 toformattedValue
. (#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
- #7414 Default
aspectRatio
to 1 for square charts - #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
- #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
- #7453 Implement routing of defaults
- #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
- #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
- #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
v3.0.0-alpha
Essential Links
Breaking Changes
There are many breaking changes in this release of Chart.js. 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. Most noticeably, 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.
Enhancements
- #7156 Use global element hidden status for Pie charts
- #7146 WebWorker support
- #7055 Configurable hide/show animations
- #7007 Improved formatting of numeric scale labels
- #7004 Format numbers in tooltip
- #6995 Add tooltip boxWidth and boxHeight options
- #6993 Allow specifying spanGaps as number (max distance)
- #6964 Allow switching platforms
- #6958 Use binary search for interpolations
- #6939 Scriptable tick fonts
- #6908 Title alignment options
- #6906 Add the ability to add a title to the legend
- #6883 Enable override settings for the axis border
- #6818 Allow axes to be centered on chart area
- #6787 Add optional stroke lines around tick text to improve readability
- #6739 Floating bar chart data can be specified using objects
- #6700 Functional config options for scale grid line configuration
- #6635 Update tooltip content and styling in
onUpdate()
- #6521 Add label alignment option to axis label title
Performance
Numerous performance enhancements have been added including the ones below. This may result in 10x or more faster performance in some use cases. Chart.js is now more than 3x faster on the uPlot benchmark.
- #7155 remove chartjs-adapater-moment
- #6959 Optimize category parse
- #6958 Use binary search for interactions
- #6871 Optimize
arrayUnique
- #6845 Rewrite animation logic
- #6783 Improve autoSkip performance
- #6775 Assume time series data has been normalized
- #6768 Allow pre-parsed data
- #6762 Improve stacking performance and footprint
- #6758 Reduce object creation during parsing
- #6757 Cache sorting order of dataset metas
- #6745 Remove moment from dependencies
- #6729 Reduce cloning and duplicate options resolution
- #6722 Change
updateElement
toupdateElements
- #6710 Performance optimizations when animations are disabled
Bug Fixes
- #7150 Stop leaking fonts (and fillStyle) to ctx
- #7139 Fill between datasets
- #7103 Change remaining
for of
loops to regular ones for IE11 compatibility - #7098 Fix transparentize in samples
- #7097 Fix memory leak
- #7079 Animate circumference by default
- #7060 Fix legend title drawing & update sample
- #7047 Fix bug in opacity handling
- #7044 Generate ticks when source is data
- #7040 Fix typo in elements.line
- #7037 Fix isRadial is always false
- #7023 Fix binarySearch for empty dataset
- #7014 When
gridLines.display
is false, the axis border is still drawn - #6989 Ensure filler works correctly when updating datasets
- #6988 Proper text alignment for multiline tick labels
- #6984 Show color box only on the first line of the tooltip body
- #6975 Fix drawPoint parameters
- #6974, #6987 Resize on zoom
- #6973 Fix clipping when zoomed
- #6972 Fix bar border artifacts
- #6971 Fix updating retinaScale
- #6966 Linear scale with min/max/stepSize set should use all 3 if the range fits
- #6962 Fix reference to distanceBetweenPoints
- #6961 Fix tooltip for 'dataset' mode
- #6953 Throttle all events (to 1 / frame each)
- #6947 Detect stack change
- #6945 Account for hoverRadius in Point.size()
- #6944 Draw active points last
- #6925 Re-parse existing elements when data is replaced
- #6826 Shrink _parsed to match if dataset shrinks
- #6778 Better support for react, don't store metadata on dataset
- #6761 Fix tick spacing calculations
- #6642 More versatile clipping algorithm
- #6576 Data is parsed only once + support stacking datasets by value using object configs
- #6227 Limit clicks to chart area
Documentation
- #7147 Ensure all samples use correct scale options
- #7128 Remove version from docs. Use latest
- #7124 Create a Tick typedef
- #7119 Include Typedoc files on GitHub pages
- #7034 Fix legend.md markdown syntax
- #6948 Update moment to 2.24 in samples
- #6919 Add multi series pie example
- #6918 Update tooltip docs with working example
- #6901 Link PolarArea chart docs to radial axis docs
- #6897 Update documentation of
order
- #6736 Update time combo chart sample
- #6666 Add sample files with gradient fills
- #5281 - Generate JSDoc documentation
Development
v2.9.3
v2.9.2
Bug Fixes
- #6641 IE11 & Edge compatible style injection
- #6655 Backwards compatible default fill for radar charts
- #6660 Improve clipping of line charts when border widths are large
- #6661 When a legend item is clicked, make sure the correct item is hidden
- #6663 Refresh package-lock file to pick up new dependency
Performance
- #6671 Stop unnecessary line calculations
Documentation
- #6643 Combine performance documentation sections
Thanks to the maintainers and collaborators for their help to improve and test Chart.js (@nagix, @kurkle, @benmccann, @etimberg and @simonbrunel).
v2.9.1
Bug Fixes
- #6603 Fix deprecation warnings for horizontal bar charts
- #6608 Fix zoom plugin by no longer clipping
scale.getDecimalForPixel
to the chart area - #6617 Non numeric Y axes did not work
Documentation
- #6613 Add link to performance documentation
Development
- #6609 - Tests no longer use deprecated options
Thanks to the maintainers and collaborators for their help to improve and test Chart.js (@nagix, @kurkle, @benmccann, @etimberg and @simonbrunel).
v2.9.0
Breaking changes
- #6131
helpers._decimalPlaces
is now private
Enhancements
- #6527 Hover styling for dataset in 'dataset' mode
- #6268 Implement
dataset.order
- #6509 Make
autoSkip
aware of major ticks - #6460 Implemented RTL support for legends and tooltips
- #6490 HTML DOM building
- #6326 Draw the rightmost grid line when
offsetGridLines
is true - #6343 Handle reverse support in core.scale
- #6289 Support
spanGaps
in radar charts - #6323 Support object values for bar charts
- #6287 Support rotation for
pointStyle
image - #6257 Allow specifying labels in time scale options
- #6281 Support boundary filling modes in radialLinear scale
- #6056 Add support for floating bar chart (
[start, end]
) - #6241 Implement layers (z-index) for layout items
- #5621 Make legend appearance consistent with chart elements
- #5999 Implement per-dataset type (default and per-chart) options
- #6097 Specify time scale
min
andmax
in standard manner - #6141 Legend align option. Thanks @dkichler
- #6128 Make line options scriptable. Thanks @janelledement
Performance
- #6594 Remove a couple calls to
helpers.each
- #6247 Remove duplicate scale building
- #6579 Cache resolved data element options
- #6575 Simplify line drawing
- #6508 Add
ticks.sampleSize
option - #6354 Perf improvement for
ticks.source:'labels'
- #6301 Replace
helpers.each
with for-loops - #6304 Refactor
core.layout
- #6307 Faster major tick calculation
- #6250 Cache
getScaleForId()
calls in the line controller - #6148 Replace
helpers.extend
Bug Fixes
- #6249 Bar options should be defined on dataset instead of scale
- #6556 Inject styles into Shadow DOM when inside Shadow DOM
- #6583 Fix unit determination when
autoSkip
is enabled - #6581 Return correct index/value id in radar/polarArea
- #6580 Fix logarithmic test to use correct scale
- #6528 Make sure
zeroLineIndex
is defined - #6523 Fix right side scale ticks
- #6423 Clamp argument of
toExponential
between 0 and 20. Thanks @veggiesaurus - #6328 Fix
getValueForPixel
in time scale - #6292 Adjust vertical alignment of tooltip items
- #6321 Update dataset metadata when axisID changes
- #6291 Assign unique scale IDs
- #6288 Fix regression in
lineTension
- #6282 Treat null as NaN in radialLinear scale
- #6285 Keep lines on the left and right edges from being cut
- #6269 Apply lineJoin style at the first point in radar charts
- #6280 Fix point label counting in radialLinear scale
- #6279 Treat 0 as a valid point label
- #6265 Utilize
tick.major
intickFormatFunction
- #6264 Apply offset regardless of min/max setting
- #6258 Fix ticks generation for vertical time scale
- #6259 Fix
determineUnitForFormatting
floating point error - #6115 Fix overlapping auto-generated ticks on time scale
- #6238 Fix tooltip title in radar charts
- #6224 Fix arc size calculation when circumference is under 2*PI
- #6215 Fix arc border with circumference over 2*PI
- #5961 Fix tick label rotation and layout issues
- #6182 Use the appropriate time format for auto tick generation
- #6208 Fill before drawing lines
- #6209 Fix missing tooltip value in radar charts
- #6177 Normalize angle for index in radialLinear scale
- #6102 Fix
ticks.minor
andticks.major
issues - #6129 Fix hover animation
- #6120 Improved
helpers.almostWhole
Documentation
- #6585 Add a note to the perf documentation about rotation
- #6554 Add link to linear radial axis for radar chart doc
- #6491 Add
elements.arc.angle
in documentation - #6466 Fixed incorrect spelling in pie dataset options. Thanks @SeppPenner
- #6435 Add link back to home page from docs
- #6393 Add radar chart config options
- #6293 Correct descriptions on
ticks.display
and addpointLabels.display
- #6263 Add sample for radar scriptable options
- #6244 Fix data in timeseries sample
- #6186 Typo in doughnut documentation. Thanks @joshuamcewen
- #6132 Make docs consistent for
cubicInterpolationMode
andfill
. Thanks @stockiNail - #6119 Demonstrate multiple units on timeseries example
- #6139 Documented tooltip alignment options
- #6134 Documented date adapter
Development
- #6507 Improved minimization when calling helpers
- #6497 Reduce indentation
- #6355 Do
autoSkip
inupdate
- #6493 Upgrade rollup and plugins
- #6362 Improved code minimization
- #6360 Create
helpers.math._factorize
- #6351 Lazily compute label sizes
- #6347 Render charts only once in time scale tests
- #6246 Avoid time related deprecation warnings in tests
Thanks to the maintainers and collaborators for their help to improve and test Chart.js (@nagix, @kurkle, @benmccann, @etimberg and @simonbrunel).