Commit Graph

448 Commits

Author SHA1 Message Date
Jukka Kurkela
ae95a8221d
Fix function support on _fallback (#8545) 2021-03-01 12:19:55 -05:00
Jukka Kurkela
86b1892810
Resolve to false only when _fallback is used (#8542)
* Resolve to false only when _fallback is used
* Typo
* 2nd part
2021-02-28 17:32:56 -05:00
Jukka Kurkela
b795151554
Remove the constantly failing test (#8538) 2021-02-28 08:49:34 -05:00
Evert Timberg
c040b8255e
Options need to include dataset level defaults from main chart type (#8534) 2021-02-28 08:58:07 +02:00
Jukka Kurkela
061e3dbf2f
Fix calling of onResize (#8529)
* Fix calling of onResize

* Try to fix the bugging animation test

* try again

* and the actual fix

* maybe now
2021-02-26 14:55:43 -05:00
Jukka Kurkela
b06cd36697
Rename cutoutPercentage to cutout + chores (#8514) 2021-02-24 16:58:01 -05:00
Jukka Kurkela
65a601476c
Remove debug option from animation (#8512)
* Remove debug option from animation

* Add converage for visible animation

* Update visible animation fn
2021-02-24 21:32:54 +02:00
Jukka Kurkela
639c34f89e
Fix set/delete oprations on Proxies (#8506) 2021-02-23 19:46:31 +02:00
Jukka Kurkela
4c960fb138
Plugin options default scriptable/indexable=false (#8497)
* Plugin options default scriptable/indexable=false

* Update test

* Inherti desciptors

* Remove unreachable code

* remove unintentional change

* remove double default
2021-02-23 17:54:42 +02:00
Evert Timberg
8c4e862a2c
Merge tooltip padding settings (#8493) 2021-02-22 08:30:25 +02:00
Jukka Kurkela
5d5e48d01b
Isolate properties / modes from animation options (#8332)
* Isolate properties / modes from animation options
* tabs, something wrong with the linter
* Update misleading variable name
2021-02-20 09:02:22 -05:00
Jacco van den Berg
d264672381
Fix/getRelativePosition NaN value with native event (#8459)
* fix bug where onClick value returned NaN because originalEvent does not exist
* add test for this behaviour
* test to async
2021-02-19 17:57:59 -05:00
Jukka Kurkela
aa5e0fe413
Remove core plugin fallbacks to root options (#8462)
* Remove core plugin fallbacks to root options
* Legend font color default fallbacks
2021-02-19 17:53:01 -05:00
Jukka Kurkela
850e6e4588
Update resolver fallback logic (#8456) 2021-02-19 08:30:39 +02:00
Jukka Kurkela
5411be10a0
Add support for common object methods to Proxies (#8452) 2021-02-18 10:04:46 -05:00
Jukka Kurkela
cfd9c98575
Option resolution with proxies (#8374)
* Option resolution with proxies

* Remove plugin fallback to root options/defaults

* Update core plugins, reduntant font fallbacks

* Add some notes
2021-02-15 14:42:32 -05:00
Jukka Kurkela
a8329e4f13
Update chartjs-test-utils to v0.2.1 (#8407)
* Update chartjs-test-utils to v0.2.0

* to 0.2.1
2021-02-10 16:17:08 +02:00
Jukka Kurkela
ddfbcf777a
Update eslint-config-chartjs to v0.3.0 (#8406) 2021-02-10 08:21:39 -05:00
Jukka Kurkela
ffe4ab14dc
Remove options.scale, in favor of options.scales.r (#8393)
Remove options.scale, in favor of options.scales.r
2021-02-06 16:19:21 -05:00
Jukka Kurkela
505afa7f13
Fix element creation for large dataset (#8388)
* Fix element creation for large dataset
* Fix syncing
* Remove duplication
2021-02-05 17:53:05 -05:00
Ben McCann
eb7ce4e5a0
Add raw data to context and rename dataPoint to parsed (#8318)
* Make the raw data point available in scriptable context
* Rename variables
* Update samples
2021-02-05 09:13:32 -05:00
Jukka Kurkela
ad84d285d8
Rename LayoutItem.fullWidth to fullSize (#8358) 2021-01-31 13:44:44 -05:00
LeeLenaleee
b50fba3759
Fix/scatter tooltip mode (#8354)
* scatter tooltip should be point by default
* edited mode on better level and updated docs to be bit more clear
2021-01-30 16:22:01 -05:00
LeeLenaleee
bc312d0dbc
feature: choose custom point style for bar legend display (#8341)
* add feature to choose custom point style for bar legend display
* add documentation and type
* the docs are in the right place now
2021-01-30 11:02:08 -05:00
Evert Timberg
06fa8a4c98
Update to test utils 0.1.2 to track font setting (#8325) 2021-01-18 07:40:18 -05:00
Ben McCann
00dbe71dbb
Revert "Update spelling of cancellable (#8236)" (#8312)
This reverts commit e6dfc47927.
2021-01-16 21:14:15 +02:00
Jukka Kurkela
ea34e8b814
Disable Path2D caching when chart is animated (#8319)
* Disable Path2D caching when chart is animated
* Add note to performance docs
2021-01-16 14:06:27 -05:00
LeeLenaleee
aa9a04a014
Skip delete undefined stack (#8291)
* fixes error on undefined stacks
* added test for functionality
2021-01-09 10:27:18 -05:00
Jukka Kurkela
df11fd98cc
Fix incorrect defaults location for Bubble (#8271) 2021-01-05 07:57:09 -05:00
Jukka Kurkela
610461d714
Use provided options in tooltip plugin (#8254) 2020-12-31 08:46:23 +02:00
Jukka Kurkela
2e43f787de
Fix small bugs when animations are disabled (#8253)
* Fix small bugs when animations are disabled
* Update test
2020-12-30 08:31:30 -05:00
Jukka Kurkela
66c92548e8
Rename helpers.clear to helpers.clearCanvas (#8238)
* Change parameters of helpers.clear

* Update test
2020-12-28 10:21:46 +02:00
Ben McCann
e6dfc47927
Update spelling of cancellable (#8236) 2020-12-28 10:20:55 +02:00
Evert Timberg
988b3c5d2b
Create standardized text render method (#8227)
* Create standardized text render method
* Document renderText options and enable configurable decoration width
* Add tests for font rendering
* Split color definition to it's own file
* renderText supports setting styles
* Mock context needs to track textBaseline
* renderText can set textAlign and textBaseline
* renderText does not mutate the context + translate/rotate
* Explicitly set the text decoration style
* Move useStroke logic into renderText
* Cartesian scale: Update computeLabelItems to avoid duplicate allocations
2020-12-26 11:23:02 -05:00
Jukka Kurkela
b55b361f97
Reject pending promises when animation is updated (#8184)
* Reject pending promises when animation is updated
* Add tests
2020-12-17 15:16:55 -05:00
Jukka Kurkela
e78310c0fd
ArcElement: Skip draw when radius is negative (#8170) 2020-12-14 17:13:03 -05:00
Jukka Kurkela
8ab62f57be
Use correct color for legend labels (#8167)
* Legend colors fallback
* Update test
2020-12-14 16:08:40 -05:00
Evert Timberg
e268845c7b
Quick exit the legend fit function when the legend is not displayed (#8161)
When the legend is not displayed, there are no guarantees that the
format of the options dictionary is correct. Rather than performing
computations and then exiting without using the results, we can instead
exit quickly since the size of the legend will be (0, 0) if not displayed
2020-12-14 12:04:10 +02:00
Evert Timberg
93c3467182
Prevent double plugin registers from losing the list of plugins (#8162)
When `Chart.register()` was called twice in a row, the list of
plugin descriptors on the chart instance would be cleared. The
next chart update would then restart all of the plugins, not
knowing that they were already started. In the case of the Legend
and Title, this causes two boxes to appear in the layout system
thus drawing twice.
2020-12-14 12:03:08 +02:00
Jukka Kurkela
c1aeba1e67
Add new scale hooks for plugins (#8112)
* Add new scale hooks for plugins

* Add notes

* cc

* cancelability
2020-12-02 06:51:47 +02:00
Jukka Kurkela
6814b79b65
Fix CategoryScale.getValueForPixel with autoSkip (#8101) 2020-12-02 06:51:33 +02:00
Jukka Kurkela
78dbeea1f0
Add new hooks for plugins (#8103)
* Notify beforeUpdate on disabled plugins

cc?

cc2

cc3

typo

* init, unInit, enabled, disabled

self review :)

update the new hook signatures to unified

merge error

* Review update

* start/stop, cc

* types, jsdoc

* stop between destroy and uninstall
2020-11-28 22:57:45 +02:00
Jukka Kurkela
61aea761f4
Unify signature of plugin hooks (#8102) 2020-11-28 09:45:43 +02:00
Jukka Kurkela
913a01a3a6
Move title, tooltip and legend to options.plugins (#8089)
* Move title, tooltip and legend to options.plugins

* Update tooltip.md

* Update legend.md and title.md

* Add migration notes

* typo

* Types

* Restore plurals

* One more s, restore tabs

* All plugins disabled

* lint

* cc
2020-11-25 08:50:12 +02:00
Jukka Kurkela
e3ad31893d
Restore datasets namespace (revert 6955) (#8090) 2020-11-24 22:27:51 +02:00
Jukka Kurkela
021561072b
Disable all plugins when options.plugins = false (#8098)
Disabling all plugins when options.plugins = false
2020-11-23 17:58:03 -05:00
Jukka Kurkela
a29af5c62c
Fix disabling hover (#8097) 2020-11-23 16:13:45 -05:00
Jukka Kurkela
2efffb8ae4
Improve test coverage (#8087)
* Remove usage of currentStyle (IE only)

* Nothing is registered in root scope anymore

* Add some more tests for animations

* Add some more tests to defaults
2020-11-23 21:06:16 +02:00
Jukka Kurkela
fa997f06e2
Do not use offsetX/Y in shadow DOM (#8082)
Do not use offsetX/Y in shadow DOM
2020-11-20 15:59:48 -05:00
Jukka Kurkela
ddc72fcfbb
Align font options with CSS (#8066)
* Align font options with CSS

* Review comments
2020-11-19 20:59:24 +02:00