1126 Commits

Author SHA1 Message Date
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 ed7a34814d.

* 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 23525abc6a.

* 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
Jonatan
f5cb133551 fix: label text not centered when applied rotation (#10773)
* fix: label text not centered on tick when rotated

#10485

* fix: label text not centered on tick when rotated

#10485
2022-10-17 21:28:31 +03:00
cmcnulty
fbf3427ca2 Fix #10749 - backdrops with rotated labels (#10759)
* Fix #10749 - backdrops with rotated labels

* remove translation adjustment
Because backdrop now occurs after translation, we don't want to double-adjust the position.

* increase tolerance slightly due to anti-aliasing

Co-authored-by: Charles McNulty <charles.mcnulty@tasconline.com>
2022-10-12 07:08:22 -04:00
stockiNail
c51d697d7f Use the correct area to clip for dataset drawing when stacked scales are used (#10691)
* Use the correct area to clip when stacked scales are used

* adds test cases

* fix CI issue

* apply review

* Update .size-limit.cjs

Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com>

Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com>
2022-10-01 21:26:45 +03:00
Dan Onoshko
52cf8e8a94 fix: aspect ratio calc (#10693) 2022-09-28 15:31:19 -04:00
Jacco van den Berg
5f37ba6fc4 Add warning if filler plugin is used but not registered (#10702)
* add warning if filler plugin is used but not registered

* fix lint

* increase size limit

* add test, only put warning in dataset controller

* fix register in docs, remove commented code

* remove other mr

* add documentation

* Apply suggestions from code review

Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com>

* Also return false if plugin is disabled by options

* improve warning message

* undo docs changes

* update test

Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com>
2022-09-26 20:20:54 +02:00
Dan Onoshko
22f32af1bc fix: calc visible points on update (#10667) 2022-09-24 17:01:47 -04:00
Kartik
1253ceddb1 FIX: render multiline legend items without overlapping (#10532) (#10641)
* FIX: render multiline legend items without overlapping (#10532)

Co-authored-by: Nirav Chavda <nmchavda99@gmail.com>

* CLN: Extract method to fix codeclimate line count

Co-authored-by: Nirav Chavda <nmchavda99@gmail.com>

* CLN: Shift helper methods from class to module scope

Co-authored-by: Nirav Chavda <nmchavda99@gmail.com>

* TST: Add test with fixtures

Co-authored-by: kartik <codebull707@gmail.com>

* FIX: Fix test case for multiline label

Co-authored-by: kartik <codebull707@gmail.com>

* 10532-ENH: Calculate legend item width for multiline labels

Co-authored-by: Nirav Chavda <nmchavda99@gmail.com>

* 10532-TST: use spriteText and non-empty labels for test

Co-authored-by: Nirav Chavda <nmchavda99@gmail.com>

* 10532-FIX: failing test case due to legendItem.text being undefined

Co-authored-by: Nirav Chavda <nmchavda99@gmail.com>

* 10532-FIX: Update compression size

Co-authored-by: kartik <codebull707@gmail.com>

Co-authored-by: Nirav Chavda <nmchavda99@gmail.com>
2022-09-16 09:46:53 -04:00
stockiNail
d4e106cc9c Provide an empty object when the target of the resolver is undefined (#10655)
* Provide an empty object when the target of the proxy is undefined

* changes check on subGetTarget function

* adds test case

* fixes lint
2022-09-15 12:12:35 -04:00
Dan Onoshko
47cb9e1f76 feat: typescript node next support (#10661) 2022-09-14 06:44:57 -04:00
Jacco van den Berg
cc65c2bac2 Fix autoskip logic (#10663)
* fix autoskip logic

* add test

* fix lint erro

* Update variable name
2022-09-13 19:33:22 +02:00
stockiNail
9871aaa262 Use ticks.steSize instead of time.stepSize on time and timeseries scales (#10653) 2022-09-10 18:46:26 +03:00
Dan Onoshko
0c51ecd451 fix: respect aspect ratio with container height (#10646)
* fix: respect aspect ratio with container height

* docs: add info into migration guide
2022-09-02 08:03:41 -04:00
Dan Onoshko
8ff853c60e feat: remove default axis override when custom id is given (#10643)
* feat: remove default axis override when custom id is given

* docs: add info into migration guide

* test: fix tests for the feat

* docs: add info into migration guide

* test: fix tests for the feat

* feat: review fixes

* feat: review fixes
2022-09-02 07:52:48 +03:00
Dominic Jean
0edb2ac604 enable pointStyleWidth for all legend style (#10639) 2022-09-01 06:37:12 -04:00
Ben McCann
9258f250b6 Switch to pnpm (#10576) 2022-08-22 20:42:43 +02:00