2298 Commits

Author SHA1 Message Date
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
Evert Timberg
06bbadb00f
Convert the PointElement to TS (#10730)
Co-authored-by: Chart.js <>
2022-10-07 08:28:03 -04:00
Evert Timberg
e6892a92cb
Convert helpers.extra to TS (#10728)
Co-authored-by: Chart.js <>
2022-10-06 15:37:42 -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
d1e118aea8
refactor: move batch of helpers to ts (#10722)
* refactor: move batch of helpers to ts

* refactor: review fixes
2022-09-30 09:48:12 -04:00
Dan Onoshko
52cf8e8a94
fix: aspect ratio calc (#10693) 2022-09-28 15:31:19 -04:00
Jacco van den Berg
fbaf28e4f8
Use guard clause typings (#10683)
* Use guard clasue

* use function type instead of build in function
2022-09-27 14:00:48 +03: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
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
83a41c2e0c
fix: types and tests (#10660) 2022-09-10 11:36:50 -04: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
Evert Timberg
b95ba3d5c3
Convert the easing helpers to typescript (#10627)
Co-authored-by: Chart.js <>
2022-08-31 09:53:54 -04:00
Jacco van den Berg
3c33d87dd2
Remove tooltip constructor fallbacks, this.chart and this._chart (#10612)
* remove tooltip fallbacks/backwards compatability in constructor

* increase size limit
2022-08-22 21:17:40 +02:00
Jukka Kurkela
3b76488373
Refine logarithmic scaling / tick generation (#9166)
* Refine logarithmic scaling / tick generation

* Disable autoSkip on reverese test

* Reduce ticks, fix min
2022-08-22 14:05:27 -04:00
Dan Onoshko
2031cdf051
Preparing the project for TypeScript (#10595)
* Add Typescript to the build
* Converts the `helpers.core` to Typescript as an example
* Converts the `core.element` to Typescript
2022-08-22 11:58:57 -04:00
Grant Hynd
75793eb86f
fix: allow beforeTooltipDraw to be cancelable (#10598) 2022-08-22 17:33:02 +02:00
Jon Dufresne
eaee1ad63b
Use the element's window in getComputedstyle (#10608) 2022-08-22 17:29:36 +02:00
Jacco van den Berg
3eb947719e
Put the border opts in own object (#10571)
* put borderOpts in own object

* document z option

* remove todo and change scaleId to id

* update some tests

* clean bit, remove console log

* fix failing test

* lint

* Remove comment
2022-08-18 15:07:46 +02:00
Dan Onoshko
e7372ade24
fix: same-looking tooltips on charts (#10548)
* fix: same-looking tooltips on multiseries charts

* fix: same-looknig tooltips on all chart types

* chore: restore tooltip plugin

* docs: additions to migration guide

* docs: remove labels from scatter and bubble examples

* docs: review fix
2022-08-18 07:34:35 -04:00
Jacco van den Berg
d09e424a0a
Use borderRadius for legend and remove fallbacks (#10551)
* Use borderRadius for legend

* re enable test

* fix lint

* add note in migration guide

* Update types/index.d.ts

Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com>
2022-08-18 07:34:18 -04:00
Jacco van den Berg
c74260b745
change way that linear scales calculate min and max (#10591) 2022-08-18 07:33:15 -04:00
Dan Onoshko
ffce0f9f18
feat: tooltip callbacks fallback (#10567)
* feat: tooltip callbacks fallback

* docs: review fixes
2022-08-18 09:03:12 +03:00
Dan Onoshko
cdb17d6eeb
feat: sideEffects false (#10526)
* feat: sideEffects false
* refactor: apply defaults by pure way
2022-08-06 08:45:41 -04:00
Jacco van den Berg
3df687a87c
Remove destroy hook (#10549)
* remove destroy hook

* revert package-lock.json changes

* update test

* add migration guide note

* fix karma failing test

* change way of importing package.json
2022-08-05 19:51:14 +03:00
Dan Onoshko
b19fc0169f
fix: pass timestamp to ticks callback (#10540)
* fix: pass timestamp to ticks callback
* docs: edit labelling page
* docs: additions to the migration guide
2022-08-05 07:59:36 -04:00
Dan Onoshko
ce375a6876
feat: add ESM support (#10525)
* feat: add ESM support

* build: rename UMD bundle

* chore: edit supbackages description

* style: disable es/no-import-meta linter rule

* test: dynamic import in cjs module

* docs: edit integrations page

* docs: review fixes

* chore: remove useless regex in webpack config

* ci: test size-limit only for ESM bundle
2022-08-04 18:43:26 -04:00
Dan Onoshko
a4de430d99
fix: treeshaking (#10504)
* fix: treeshaking
* refactor: DatasetController.datasetElementType and DatasetController.dataElementType as static props
2022-08-04 09:17:40 -04:00
Ivan Gamboa Ultreras
9ab50e6313
Fix offset on doughnut charts (#10469)
Fix offset on doughnut charts
2022-08-03 20:27:17 +03:00