2331 Commits

Author SHA1 Message Date
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
Roman Shtylman
b16f32afca Check for isNaN before building number formatter options (#11238)
* 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>
2023-04-19 18:22:25 -04:00
Tim Gates
b34e273880 docs: Fix a few typos (#11220)
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>
2023-04-02 07:58:40 -04:00
Dan Onoshko
c0bf05f87d refactor: rewrite config helpers to ts (#11121)
* refactor: rewrite config helpers to ts

* refactor: review fixes
2023-03-21 16:03:15 -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
Dan Onoshko
1324672637 refactor: rewrite canvas helpers to ts (#11100)
* refactor: rewrite canvas helpers to ts

* refactor: review fixes

* refactor: rm src/helpers/types.ts temporary entry point
2023-02-15 09:26:49 -05:00
Mikhail
22c6906bbe Simplify _arrayUnique (#11145) 2023-02-15 09:20:29 -05:00
stockiNail
7f9bca6844 Add borderDash options to arc element (#11127) 2023-02-12 17:46:05 -05:00
leo2436
6cf9de9681 Change labelColors to labelColor in tooltip drawColorBox method. (#11135)
Co-authored-by: Leo Chen <liang.chen@thoughtworks.com>
2023-02-12 14:15:07 -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
Shahab HM
2481547ef8 fix RTL tooltip colorBox placement (#11061)
* fix RTL tooltip colorBox placement #10771

* fix lint problem
2023-02-10 07:57:24 -05:00
Johannes Kronmüller
207fe8f66e fix: decimation plugin data not writeable after clean (#11045) 2023-02-10 07:45:43 +02: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
stockiNail
1db46efa5f Remove unused property from arc element for center calculation (#11124) 2023-02-08 18:01: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
Yujin Choi
1684cf7dbf fix: add bgColor type in RadialLinearScaleOptions (#11081)
* fix: add bgColor type in RadialLinearScaleOptions

* Update src/types/index.d.ts

remove trailing space

---------

Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com>
2023-01-30 18:23:08 -05:00
Jean-Louis Jouannic
b967d71c87 🐛 fixes compilation error when option --isolatedModules is set (#11095)
* 🐛 fixes compilation error when option --isolatedModules is set

* ♻️ preserve UpdateModeEnum to prevent breaking change
2023-01-28 09:19:02 -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
997eab46ac Change 'normal' update mode to 'default' as documented (#11017) 2023-01-18 08:27:47 -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
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
Jacco van den Berg
237a893415 Add Z index to border options (#11008) 2022-12-20 12:23:16 -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
ae264e14e7 add getLabelItems public method (#10966) 2022-12-16 07:36:14 +01:00
Dan Onoshko
185bb97d2e fix: turn on types linting (#10962) 2022-12-16 01:09:14 +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
Evert Timberg
b491554995 Ensure that args are saved inside of the throttled helper (#10942)
* Ensure that args are saved inside of the throttled helper

* Capture args in outer scope

* Simplify capture
2022-12-10 08:21:41 -05:00
Jacco van den Berg
8239567802 Allow color plugin to work with custom dataset controllers (#10904) 2022-11-25 15:03:49 +01:00
Kit PANG
667b28beca fix: respect minBarLength in stacked bar chart (#10766) 2022-11-22 20:21:02 -05:00
stockiNail
36fb08c946 Sets the transition mode to the context for scriptable options (#10898) 2022-11-21 14:00:51 -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
Jacco van den Berg
53b79673eb Remove type attribute from dataset specific type specification (#10869) 2022-11-13 19:36:25 +02: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
Lucca Miranda
24745fac51 refactor: migrate helpers.options to typescript (#10753)
* refactor: migrate helpers.options to typescript

* chore: nitpicks
2022-11-04 11:17:09 -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
Evert Timberg
c338942ebb Convert the Arc element to TS (#10772)
* Convert the Arc element to TS

* Make max-statements and complexity warnings in TS files as well

* Increase size limit

* Update src/elements/element.arc.ts

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

Co-authored-by: Dan Onoshko <danon0404@gmail.com>
2022-10-12 07:08:37 -04: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
Lucca Miranda
b0160e138a refactor: migrate helpers.dom to typescript (#10734) 2022-10-09 09:21:12 -04:00
Evert Timberg
41612d1320 Convert the curve helpers to TS (#10733)
* Convert the curve helpers to TS
* Remove old type
2022-10-07 08:28:24 -04:00