* 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
* Check for isNaN before building number formatter options
When datasets have values approaching Number.MAX_VALUE, the tick calculations might result in infinity and eventually NaN. Passing NaN for minimumFractionDigits or maximumFractionDigits will make the number formatter throw. Instead we check for isNaN and use a fallback value so the formatter does not throw.
* Update src/core/core.ticks.js
Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com>
---------
Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com>
There are small typos in:
- docs/general/colors.md
- src/controllers/controller.doughnut.js
- src/controllers/controller.pie.js
- src/scales/scale.time.js
Fixes:
- Should read `outer` rather than `outr`.
- Should read `indistinguishable` rather than `indistiguishable`.
- Should read `guesstimation` rather than `guestimation`.
Signed-off-by: Tim Gates <tim.gates@iress.com>