Repository navigation
Essential Links
Breaking Changes
- The density dataset type is now
histogramDensity. It draws a density curve over a histogram dataset and needs one, and Chart.js chart type ids are shared by every plugin, so the genericdensityid is left free. The exports follow:HistogramDensityController,HistogramDensityDatasetOptionsandHistogramDensityControllerOptions. Options,computeDensityand warning codes are unchanged. - Round ticks on the bin axis. The axis still ends on the first and last bin edges, but its ticks are now round values inside that range, such as 140, 150, …, 190 on an axis from 134.7 to 195.5. Before, Chart.js counted the ticks from the first edge and added the last edge as a tick of its own, and the last two labels could be drawn on top of each other. Set
ticks.stepSize,ticks.count,bounds: 'ticks'or your ownafterBuildTicksto get Chart.js's ticks, or usebinEdgeTicksfor a tick on every edge.
Bug Fixes
- Smooth density curves at high pixel ratios.
histogramDensitydatasets default tocubicInterpolationMode: 'monotone'. As a straight line of 512 points, the curve took Chart.js's fast path, which showed small notches along it on HiDPI screens. The monotone curve never overshoots its points, so it stays at or above zero; setcubicInterpolationMode: 'default'for straight segments.
See the migration guide for the full list of renames.