* Update type definitions and docs for legends
* Fix types for onHover and onClick callbacks
core.controller.js's implementation also passes the Chart instance as `this`. However, that isn't documented, and it's my impression that Chart.js is moving away from passing items as `this`, so I didn't declare it in the type definitions.
* Allow multi-line ticks
* Stricter DeepPartial definition
The previous definition resolved to `{}` (which can allow primitives) if it was given a function, so it was far too broad for any `Scriptable<>` properties.
* Grammar and writing style
* Updates to animation docs
Document the `fn` option, since it's in the type definitions.
Fix callback usage to match example code.
* Fix AnimationEvent parameter
The onProgress and onComplete events were mistakenly declared as taking the standard DOM AnimationEvent. (Should Chart.js's AnimationEvent be renamed to ChartAnimationEvent to avoid any possible ambiguity?)
* Allow false for disabling animations
* Add comments explaining the layout and usage of Rollup
From what I can tell from testing locally, Chrome doesn't reliably trigger resize events for the final print layout, so using `.resize()` with no parameters doesn't generally work.
I'm not sure if there are circumstances in which the original docs' suggestion of using `.resize()` with no parameters can work; if the original text should be deleted, I can do so.
I also noticed that the TypeScript type definitions for `.resize()` mark the parameters as required, even though the implementation and docs don't require them.
* Add locale to ChartOptions type
* Adds locale options documentation
* fixed typo
* changes links to number format, linking the constructor
* changes to a better sentence
* changes to better sentence (2)
Co-authored-by: stock <stocki.nail@gmail.com>
* Scale: added the stacked property for all scales
* interfaces: generic type LABEL can be string, Date, etc.
* controllers: stack can be used for all types of dataset
* docs/data-structures: added general dataset properties
Co-authored-by: Sergey Khomushin <sergey@placer.io>
* Add helper to parse border radius options
* feat: Implement borderRadius for bar charts
* chore: add demo of bar charts with border radius
* chore: document bar borderRadius
* chore: update typescript with bar borderRadius property
* fix horizontal borders test failing due to antialiasing
* chore: Add border-radius visual test
* Rename elements to mark as elements, i.e. Arc -> ArcElement
* Rename RectangleElement to BarElement
* Also updates options.elements.rectangle to options.elements.bar
* Allow the tooltip to get closer to the canvas edge
Closer to the top & bottom by considering (height/2) instead of height.
* Update missing options in TS types
* Remove unneeded brackets
Provide APIs to set active (hovered) and tooltip elements.
Chart.setActiveElements will set the hovered items.
Chart.tooltip.setActiveElements will set the tooltip items.
* Provide method to lookup a chart from a canvas
* Throw an error during construction if a canvas is in use
* Migration docs for new constructor behaviour