Jacco van den Berg
2fa724110a
Check if range method exists on element before executing it ( #11873 )
...
Co-authored-by: Jacco van den Berg <jacco@jem-id.nl >
2024-08-20 21:37:23 +02:00
Jacco van den Berg
3dac05ed00
Return false from the average tooltip positioner on no valid data ( #11863 )
2024-08-17 08:52:36 +02:00
Artur Morys - Magiera
b51b57aca4
fix(types): exclude DeepPartial<unknown[]> from ChartOptions interface ( #11867 )
...
* fix(types): exclude DeepPartial<unknown[]> from ChartOptions interface
* refactor: format index.d.ts to comply with ESLint rules
2024-08-16 19:57:26 -04:00
Artur Morys - Magiera
74122c1b0f
fix(types): add xCenter and yCenter properties to RadialLinearScale interface ( #11862 )
2024-08-16 08:25:47 +02:00
huqingkun
b9c01414ba
Bugfix/issue 11804 tooltip show for all invisible ( #11858 )
...
* 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 >
2024-08-12 11:56:35 -04:00
Dimitris-Rafail Katsampas
f3f84fd624
fix: Unset _resizeBeforeDraw before _resize() call to avoid possible recursion ( #11851 )
...
* fix: Unset _resizeBeforeDraw before _resize to avoid possible recursion
* chore: Comment update
* chore: Reverted dependency change in package json
2024-08-08 20:08:30 +02:00
huqingkun
147ee593ba
fix issue #11717 ( #11844 )
...
* fix issue #11717
Signed-off-by: Hu, Vince <Qingkun.Hu@fmr.com >
* unit test for issue #11717
* fixing test lint style issue
* update codes according review comments
---------
Signed-off-by: Hu, Vince <Qingkun.Hu@fmr.com >
2024-08-06 17:32:26 +02:00
Jacco van den Berg
19c02c8a25
Remove boxPading from legend options ( #11817 )
...
Co-authored-by: Jacco van den Berg <jacco@jem-id.nl >
2024-06-26 14:01:19 +02:00
Michel Machado
4ee6c9e279
Add fit method to LegendElement interface ( #11796 )
2024-05-31 08:43:46 -04:00
Jacco van den Berg
ff740789a5
Fix drawing angle lines on reversed radial scale ( #11788 )
...
* Fix drawing angle lines on reversed radial scale
* add test
* Show ticks in test
---------
Co-authored-by: Jacco van den Berg <jacco@jem-id.nl >
2024-05-24 16:15:28 +02:00
Jon Dufresne
228a485603
types: Allow passing undefined for chart options ( #11780 )
...
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.
2024-05-21 09:07:35 -04:00
Jon Dufresne
5c9e5c66d2
Fix some typos ( #11781 )
2024-05-21 12:10:07 +02:00
Arun Philip
e7b8fa290f
do not attempt to clear canvas if one does not exist ( #11764 )
...
* 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 >
2024-05-17 08:16:58 -04:00
EricWittrock
f785882aeb
Fix error when object prototype is frozen ( #11754 )
2024-04-29 06:42:05 +02:00
EricWittrock
6daf4ba4e3
#11450 hide bar by dataindex ( #11755 )
2024-04-29 06:36:56 +02:00
Jacco van den Berg
8c004a1c42
Create parsed object with correct keys ( #11690 )
...
* Create parsed object with correct keys
* Add test
2024-04-28 20:37:29 -04:00
Arun Philip
1777f959e5
platform.isAttached should return false if canvas is false-y ( #11707 )
...
* platform.isAttached should return false if canvas is false-y
* change styling to conform to codeclimate linter
2024-03-11 09:57:07 +01:00
Arun Philip
bbdaa6a14b
addListener and removeListener are only invoked on defined (and valid) values ( #11685 )
2024-02-28 10:55:52 -05:00
Megaemce
4068bd8c47
fix #11503 , autoskipping 0 ticks when min is below 0 ( #11682 )
2024-02-24 20:30:35 +01:00
mirumi
ef5e4d4692
docs(types): fix description in index.d.ts ( #11674 )
2024-02-18 13:31:37 +01:00
waszkiewiczja
caa56ce87d
changed r to optional in BubbleDataPoint ( #11662 )
2024-02-12 08:49:57 -05:00
Hyun-je Alex Moon
dff44828db
fix( #11615 ): fix calculating caretX position on stacked bar with index interaction. ( #11616 )
2023-12-27 07:18:14 +01:00
Jacco van den Berg
8e19199f58
Update font spec type ( #11605 )
2023-12-04 19:56:38 +01:00
Josh Kelley
429d99dbc2
Tooltip fixes (getLabelAndValue on null controller, null getParsed) ( #11596 )
...
* 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 .
2023-11-29 14:51:56 -05:00
Kevin Read
e92d10445b
fix: Guard access to window in helpers.dom.ts for browserless rendering ( #11588 )
2023-11-17 16:34:20 +01:00
Jacco van den Berg
2a03e138e9
Fix backdrop padding ( #11577 )
...
* fix for alignment inner
* Add test
* Remove eslint ignores
* remove unecesarry config
* Remove text from test
2023-11-10 00:25:36 +01:00
Dimitris-Rafail Katsampas
6722512744
fix: Property platform missing from chart configuration typings ( #11572 )
2023-11-09 23:35:01 +01:00
Vsevolod Fedorov
06f9ffb275
fix: pass Plugin TType down to hooks chart arg ( #11569 )
2023-11-06 18:34:29 +01:00
Mikhail
ca77bed318
fix: simplify check hasFunction ( #11490 )
2023-09-11 08:31:29 +02:00
Cazka
e74ee7b75b
allow mode to be a callback function ( #11488 )
2023-09-06 17:13:33 +02:00
Chocomint
44b97b8698
docs: Fix typo for documentation of plugins.tooltip.textDirection ( #11483 )
2023-09-04 10:13:29 +02:00
Mercy Bickell
a3fc84113e
fix: Add backgroundColor type on CoreScaleOptions ( #11348 )
...
* Fix: add backgroundColor type on CartesianScaleOptions
* Add instead on CoreScaleOptions
* Remove redundant backgroundColor from RadialLinearScaleOptions
2023-08-08 00:18:54 +02:00
Bogdan Korshunov
132324f5b8
BorderRadius of Bar Chart issue on Firefox 116 ( #11435 )
...
Co-authored-by: bogdankorshunov <korshunov.oren@gmail.com >
2023-08-07 20:16:32 +02:00
stockiNail
79f1a0a9e8
Add clip option to scale configuration to allow unclipped scales ( #11404 )
...
* Add clip option to scale configuration to allow unclipped scales
* add images
* fix cc
* change name of function
2023-08-07 20:16:20 +02:00
stockiNail
a102ca515b
Revert fix for monotone cubic interpolation ( #11432 )
2023-08-02 10:42:29 -04:00
stockiNail
bda2ae7c4f
Revert feature to disable plugins by TS ( #11422 )
2023-07-26 08:59:42 -04:00
Josh Kelley
dd03016ba1
Updates to scale type definitions ( #11419 )
...
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
2023-07-25 18:39:25 -04:00
stockiNail
f287be491c
Add missing feature for disabling plugins in TyeScript ( #11403 )
...
* Add missing feature for disabling plugins in TyeScript
* apply review
* remove empty line
2023-07-24 15:39:38 -04:00
stockiNail
cc7ee8ade1
Fix curve path if scale limits are set for line chart ( #11377 )
...
* Fix curve path if scale limits are set for line chart
* add scale limits test case
2023-07-24 19:58:23 +02:00
stockiNail
05608b0ceb
Fix time series scale to have each data point is spread equidistant ( #11388 )
...
* Fix time series scale to have each data point is spread equidistant
* remove tabs
* remove casting and add/update test cases
2023-07-13 16:36:08 -04:00
skopz356
c392a7cc8c
Fix type of tickBorderDash in GridLineOptions ( #11396 )
2023-07-11 14:32:10 -04:00
Evert Timberg
a173943e55
Split the TimeScaleOptions type into composable sub types ( #11187 )
2023-07-05 08:54:28 -04:00
Evert Timberg
f2cfb933b9
fix: add pointStyleWidth to type definitions ( #11383 )
2023-07-01 08:51:53 -04:00
stockiNail
57bbd8229d
Fix mismatch between hit boxes and drawn items in legend plugin ( #11352 )
...
* Fix mismatch between hit boxes and drawn items in legend plugin
* fixes padding calculation
2023-06-20 18:20:12 +02:00
Jacco van den Berg
1c2dd6898e
Add beforeDraw to drawtime type ( #11358 )
2023-06-20 18:16:50 +02:00
stockiNail
b42f9d127d
Add events property to Plugin defined type ( #11350 )
2023-06-20 18:16:37 +02:00
Jacco van den Berg
201ddffa1d
Add text stoke radial linear scale ( #11346 )
2023-06-13 23:31:17 +02:00
stockiNail
ec7be48470
Fix toggling showLine option on scatter controller ( #11334 )
2023-06-08 08:53:50 -04:00
Muhammad Khalikov
0cbc292dc7
Refined grammar and updated overall .md documentation files ( #11324 )
2023-06-05 09:56:56 +02:00
stockiNail
abbd5a7a70
Export explicitly the plugin options definition which is augmented ( #11309 )
2023-05-25 09:12:28 -04:00