* Update plugin to use it's own tooltip context
* Scriptable tooltip option types
* Tests
* Update types to use UnionToIntersection
* Update TooltipItem to use UnionToIntersection
* fix: Decimation plugin no longer changes the data order
fix: Decimation plugin no longer duplicates data points
* Use nullOrUndef helper instead of direct check
* Compute averageX value when decimating data using minMax decimation
* Place last point of interval at real X
This reduces the fuzziness on screens with devicePixelRatio > 1
* Create a new hook to enable data decimation
The `beforeElementUpdate` hook can be used to decimate data. The chart
elements will not be created until after this hook has fired ensuring that
if decimation occurs, only the needed elements will be created.
* Address code review feedback
* Rename hook to beforeElementsUpdate
* Simplify parsing logic
* Add decimation plugin to the core
* Allow a dataset to specify a different data key
* Decimation plugin uses the dataKey feature
* Refactor the decimation plugin to support configurable algorithms
* Lint the plugin changes
* Tests for the dataKey feature
* Convert test files to tabs
* Standardize on tabs in ts files
* Remove the dataKey feature
* Replace dataKey usage in decimation plugin
We define a new descriptor for the `data` key allowing the
plugin to be simpler.
* Disable decimation when indexAxis is Y
* Simplify the decimation width approximation
* Resolve the indexAxis correctly in all cases
* Initial documentation
* Reverse check
* Update TS definitions for new plugin options
* Move defineProperty after bailouts
* Add destroy hook
* Create standardized text render method
* Document renderText options and enable configurable decoration width
* Add tests for font rendering
* Split color definition to it's own file
* renderText supports setting styles
* Mock context needs to track textBaseline
* renderText can set textAlign and textBaseline
* renderText does not mutate the context + translate/rotate
* Explicitly set the text decoration style
* Move useStroke logic into renderText
* Cartesian scale: Update computeLabelItems to avoid duplicate allocations
When the legend is not displayed, there are no guarantees that the
format of the options dictionary is correct. Rather than performing
computations and then exiting without using the results, we can instead
exit quickly since the size of the legend will be (0, 0) if not displayed
* 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.
* Stop failing early when no scales are registered
* Move filler defaults
* Move legend defaults
* Remove legendHitBoxes from title
* Move @kurkle/color to devDependencies