1141 Commits

Author SHA1 Message Date
Jacco van den Berg
3f2968cb41
Add check to colors plugin if defaults are set (#11927) 2024-10-13 09:12:16 +02:00
Jacco van den Berg
680cd227d4
Fix initial dataset stacks (#11882)
* Update cahced _stacked value after updating stacks

* Add test

---------

Co-authored-by: Jacco van den Berg <jacco@jem-id.nl>
2024-08-26 17:13:12 +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
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
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
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
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
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
Megaemce
4068bd8c47
fix #11503, autoskipping 0 ticks when min is below 0 (#11682) 2024-02-24 20:30:35 +01: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
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
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
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
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
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
stockiNail
ec7be48470
Fix toggling showLine option on scatter controller (#11334) 2023-06-08 08:53:50 -04:00
stockiNail
eff39c0769
Enable point labels hiding when overlapped (#11055)
* Enable point labels hiding when overlapped

* fix cc

* fallback CC updates

* fixes CC
2023-04-27 18:28:55 -04:00
stockiNail
ee7e928cfe
Enable applying of gradients and pattern on line segments (#11217)
* Enable applying of gradients and pattern on line segments

* add test case

* improve replacer
2023-04-27 18:25:13 -04:00
stockiNail
5ee0ff1b97
Border is counted as part of ArcElement (#11180)
* Border is counted as part of ArcElement

* improve calculation
2023-04-19 18:22:40 -04:00
stockiNail
82aca7852f
Use custom scale defaults and dataset axis ID options to determine the axis (#11134)
Use custom scale defaults to determine the axis
2023-02-15 09:27:13 -05:00
stockiNail
7f9bca6844
Add borderDash options to arc element (#11127) 2023-02-12 17:46:05 -05:00
CodingMarco
e417c60c22
Fix: don't generate ticks > max if max is specified (#11116)
* Fix: don't generate ticks > max if max is specified (#11083)

* Add test "Should not generate any ticks > max if max is specified" (#11083)
2023-02-10 07:57:58 -05:00
stockiNail
8dfcf1c443
Use maxTicksLimit option to calculate the labels size on ticks (#11069)
* Use maxTicksLimit option to calculate the labels size on ticks

* apply review
2023-02-09 09:26:11 -05:00
Dan Onoshko
6cb10dc895
chore: #10963 revert (#11102) 2023-02-07 11:51:48 -05:00
Jacco van den Berg
d20b59fb03
Add colors plugin TS options to be configured (#11115) 2023-02-07 08:19:00 -05:00
stockiNail
e8d9fb579e
Add format method to time scale to format timestamp using scale options (#11063) 2023-01-18 08:27:52 -05:00
stockiNail
ab55f6c976
Check colors definition in the chart options (#11003)
* Check colors definition in the chart options

* Update src/plugins/plugin.colors.ts

Co-authored-by: Dan Onoshko <danon0404@gmail.com>

* Update src/plugins/plugin.colors.ts

Co-authored-by: Dan Onoshko <danon0404@gmail.com>

* Update src/plugins/plugin.colors.ts

Co-authored-by: Dan Onoshko <danon0404@gmail.com>

* apply review

Co-authored-by: Dan Onoshko <danon0404@gmail.com>
2023-01-18 13:31:33 +01:00
stockiNail
4cd68535d7
Remove console.warn from a test case where not needed (#11056) 2023-01-13 09:33:34 -05:00
Michiel Lankamp
0e189dd554
fix: updated type for doughnut offset (#11051) 2023-01-13 10:06:33 +02:00
Dan Onoshko
fd505acced
fix: fix Plugin interface (#11016) 2022-12-22 16:17:28 -05:00
Guy B
9306d7fd49
fix: avoid resize loop when browser zoom is set to 90% (#10971)
* test: new test to reproduce issue #10951

* test:  validate the canvas style too

* fix: Avoid reassigning the the chart size. For specific values of pixelRatio the assignment would cause the size to reduce by 1px. Since it's called from the ResizeObserver it will be stuck in a loop that constantly reduce the size of the chart and canvas.

* Revert "fix: Avoid reassigning the the chart size. For specific values of pixelRatio the assignment would cause the size to reduce by 1px. Since it's called from the ResizeObserver it will be stuck in a loop that constantly reduce the size of the chart and canvas."

This reverts commit ed7a34814dd01f57eabc2379fc7187b9a41c8732.

* fix: Avoid the resize loop by fixing the rounding error in the retinaScale function.

* fix: getMaximumSize was flooring non-integer height values unnecessarily.

* Revert "fix: Avoid the resize loop by fixing the rounding error in the retinaScale function."

This reverts commit 23525abc6aadc9880f841ff58dbd4a4ea0b14e88.

* fix: Avoid the resize loop by fixing the rounding error in the retinaScale function.
2022-12-17 09:41:21 -05:00
Dan Onoshko
64a027874c
fix: move types to src dir to escape src / dist dirs in paths (#10993) 2022-12-16 07:56:06 -05:00
Dan Onoshko
bc84a98ec6
fix: hotfix chart.js/auto for commonjs (#10992)
* fix: hotfix chart.js/auto for commonjs

* fix: add auto.cjs to side effects
2022-12-16 07:53:27 -05:00
Dan Onoshko
ae264e14e7
add getLabelItems public method (#10966) 2022-12-16 07:36:14 +01:00
Dan Onoshko
35fd6204b9
feat: restore commonjs bundle (#10984) 2022-12-16 01:11:11 +02:00
Jacco van den Berg
41f8128c2b
Allow dynamic datasets to be colored (#10964)
* Allow dynamic datasets to be colored

* revieuw
2022-12-14 21:43:41 +01:00
Kit PANG
667b28beca
fix: respect minBarLength in stacked bar chart (#10766) 2022-11-22 20:21:02 -05:00
Dan Onoshko
22f0dfe9a7
feat: colors for mixed charts (#10870) 2022-11-18 13:15:08 -05:00
Jacco van den Berg
9a9ff6fdbd
Pointstyle false (#10886)
* fix-#10755

* none to false

* str to bool

* str to bool

* 10/10

* fix test

Co-authored-by: puneetkathar1 <puneetkathar1@gmail.com>
Co-authored-by: Puneet Kathar <73285338+puneetkathar1@users.noreply.github.com>
2022-11-18 13:14:47 -05:00
Dan Onoshko
51441272a7
refactor: move to esm in sources (#10879) 2022-11-17 08:08:44 -05:00
t-mangoe
63993b03b1
check the data set type in DoughnutController (#10867) 2022-11-12 15:41:21 -05:00
Richard Gibson
89487501b6
fix: Always draw full arcs and borders for doughnut slices (#10806)
* test: Add a failing test for single-slice doughnut with offset

* fix: Always draw full arcs and borders for doughnut slices

Fixes #10801

* test: Update existing image
2022-11-12 21:47:08 +02:00
stockiNail
5a90b71163
Fix the missing apply for the color on the legend labels (#10855)
* Fix the missing apply for the color on the legend labels
* apply review
2022-11-04 18:55:27 -04:00
stockiNail
b271b5098a
Enable colors plugin for pie charts (#10851)
* Enable colors plugin for pie charts

* fixes CC
2022-11-04 11:17:49 -04:00
Igor Lukanin
1c2f66a00e
Introduce Colors plugin (#10764)
Introduces a colors plugin that provides a color palette

Co-authored-by: Dan Onoshko <danon0404@gmail.com>
Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com>
2022-10-21 08:21:08 -04:00