* First step in fixing the bug of spanGaps null point interaction
* Complete bugfix of spanGaps null point interaction
* Add two tests in core.interaction.tests for the bugfix change
* Remove odd line break
* Use isNullOrUndef helper for point value checks
* Add 10 more test cases for nearest interaction when spanGaps=true
* Bugfix: spanGaps not working near min and max limits
* Fix error when meta.dataset.options = null
* Add tests for correct setting of line controller properties _drawStart and _drawCount
* Fix spacing in controller line tests
* Add tension to test
* Add a better test case
* Avoid the use of FindLastIndex
* Avoid taking 0 for null value and improve naming
* exclude 0 angle from inRange to not showing tooltip when all data are hidden
Signed-off-by: Hu, Vince <Qingkun.Hu@fmr.com>
* test 0 angle point not in arc range
---------
Signed-off-by: Hu, Vince <Qingkun.Hu@fmr.com>
When exactOptionalPropertyTypes, TypeScript distinguishes between the
value undefined and the property not existing. See:
https://www.typescriptlang.org/tsconfig/#exactOptionalPropertyTypes
For Chart.js options, this difference is not important and either
passing undefined or not including it have the same effect.
* do not attempt to clear canvas if one does not exist
* update test to explicitly run clearCanvas method to ensure it doesn't throw an error
* explicitly set canvas and ctx to null in test since the helper in test code didn't
* Update test/specs/helpers.canvas.tests.js
---------
Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com>
* Fix for getLabelAndValue on null controller
I encountered #11315 under the following circumstances:
1. Position the cursor over the chart area, such that it causes a
tooltip to be shown.
2. Move the cursor out of the chart area, such that the tooltip remains
visible.
3. Cause the chart contents to be changed, such that the dataset
referenced by the active tooltip element is no longer valid.
4. Move the mouse again. This triggers an `inChartArea = false` event,
so it reuses the previous, now invalid, active elements.
This fixes#11315 under the circumstances for which I've reproduced it,
but there may be others.
* Further fixes for elements added / changed
This possibly fixes#11365.
* Fix: add backgroundColor type on CartesianScaleOptions
* Add instead on CoreScaleOptions
* Remove redundant backgroundColor from RadialLinearScaleOptions
While adding some type definitions to chartjs-plugin-zoom
(see https://github.com/chartjs/chartjs-plugin-zoom/pull/774), I noticed
a few limitations in Chart.js's scale types:
* The zoom plugin calls `Scale.parse` with no index parameter. Scale's
JSDoc allows this, but its TypeScript definitions did not.
* The zoom plugin alters scale options' min and max. The specific types
of these depend on which scale is in use, but every scale has them, so
`unknown` seems appropriate