Commit Graph

1884 Commits

Author SHA1 Message Date
LeeLenaleee
f191f2f5f9 Remove dataset while hovered (#8181) 2020-12-16 16:40:10 -05:00
Jukka Kurkela
979cd4131b Fix legend alignment issues (#8168) 2020-12-15 08:50:13 +02: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
Jukka Kurkela
e1a3303c67 Legend plugin cleanup (#8109)
* Legend plugin cleanup

* cc1

* cc2

* cc3

* start/stop
2020-12-14 15:35:04 +02:00
Josh Kelley
5ed422a93a Update docs for .resize() method (#8151)
See #7678 and #8149.  (The `silent` parameter mentioned in the original 7678 no longer exists.)

Add JSDoc.

Fix some minor issues with grammar and coding style consistency.
2020-12-14 12:30:20 +02: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
Evert Timberg
649f815328 Respect the set locale for in the pie/doughnut tooltips (#8142) 2020-12-06 18:17:22 -05:00
LeeLenaleee
ae04fcf3c3 fix default font color for legend (#8139)
* fix default font color for legend
* adjusted docs to be consistent with fontColor to color
2020-12-05 14:34:34 -05: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
d6b4fe2629 LineElement: no fill by default (#8111)
* LineElement: no fill by default
* Update negative-times fixture
2020-11-28 15:07:46 -05:00
Jukka Kurkela
61aea761f4 Unify signature of plugin hooks (#8102) 2020-11-28 09:45:43 +02:00
Jukka Kurkela
5faffae81b Title plugin cleanup (#8104)
* Title plugin cleanup

* more cleanup

* cc

* center formula

* Fix / update sample

* Restore functionality on RTL page
2020-11-26 15:07:01 +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
99aa1a4215 Switch to eslint-plugin-es (#8075)
* Switch to eslint-plugin-es

* Restore eslint-config-chartjs

* Sort
2020-11-19 21:23:24 +02: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
Jukka Kurkela
f96fa2b96d Allow single parameter to Defaults.set (#8050)
* Allow single parameter to Defaults.set

* Review update

* Record
2020-11-19 20:58:24 +02:00
Jukka Kurkela
a35dade663 Enable bounds option to all cartesian axes (#8060) 2020-11-16 15:01:47 -05:00
Jukka Kurkela
0c515c0e67 Unify cartesian scale tick order (#8062) 2020-11-16 14:59:53 -05:00
Jukka Kurkela
910158055f Drop legacy browser support (#8009)
* Drop legacy browser support

* Docs

* Use rollup-plugin-istanbul for coverage

* exclude node_modules from coverage

* No cleanup() when doing coverage
2020-11-16 21:01:33 +02:00
Jukka Kurkela
1b6226342a Refactor/cleanup range option handling (#8057) 2020-11-16 20:19:59 +02:00
Jukka Kurkela
ef89abb84b CategoryScale: automatically add missing labels (#8053)
CategoryScale: automatically add missing labels
2020-11-14 17:00:17 -05:00
Jukka Kurkela
fde84f272a Chart.register: preserve existing defaults (#8052) 2020-11-14 14:38:38 -05:00
Jukka Kurkela
c2dd264fe8 Events: Only render when needed (#8049) 2020-11-13 17:35:40 -05:00
Jukka Kurkela
183637b87f Add tests and clean up resolveObjectKey helper (#8028)
* Add tests and clean up resolveObjectKey helper

* Change the optimized path to comply with thests
2020-11-10 17:34:31 +02:00
LeeLenaleee
c3e861d78c dataset tooltip now shows correctly (#8024)
* dataset tooltip now shows correctly

* removed optional chaining
2020-11-08 15:41:52 -05:00
emmcbd
7ad91817e7 Improved types for defaults (#8025) 2020-11-08 09:52:41 -05:00
Jukka Kurkela
91fec4a397 Bubble: Use point.size() in getMaxOverflow (#8018) 2020-11-08 08:44:26 -05:00
Jukka Kurkela
d74a5d7552 Add type to context objects (#8007) 2020-11-08 08:43:55 -05:00
Evert Timberg
17f6edb650 Remove I prefix from TS types (#8017)
* Remove I prefix from TS types
* Update missing `ILayoutItem` typedefs
* IEvent should become ChartEvent
* Prevent FillTarget collision
* Import FontSpec instead of IFontSpec
* Prevent recursive DateAdapter problem
2020-11-07 08:35:19 -05:00
Jukka Kurkela
34312fd66a Remove +-10px limit from bar controller (#8014)
* Remove +-10px limit from Bar controller
* Remove unused import, update tests
2020-11-06 08:07:15 -05:00
Jukka Kurkela
d393fa8b51 Normalize rotation and circumference resolution (#8015) 2020-11-06 08:06:38 -05:00
Jukka Kurkela
10ffe753d9 When data is removed, remove from stacks too (#8013)
* When data is removed, remove from stacks too
* Remove unreferenced metasets
2020-11-06 08:05:56 -05:00
Jukka Kurkela
aae53c835e Use same merging logic for init and update (#8006)
* Use same merging logic for init and update
* Add test
2020-11-04 15:52:20 -05:00
Evert Timberg
0476243539 Remove draft features (#7996) 2020-11-03 08:15:56 -05:00
Jukka Kurkela
4daf37e864 Delay resize to just before draw when animating (#7989)
* Remove unused properties
* Delay resize to just before draw when animating
* Remove silent resize, update migration guide
* Fix typo in migrations doc

Co-authored-by: Evert Timberg <evert.timberg+github@gmail.com>
2020-11-01 08:15:43 -05:00
Jukka Kurkela
23bf7c0c89 Preserve scriptable context (#7981)
* Preserve scriptable context
* CC, utilize `index` in tests
* Update example to utilize context
2020-11-01 07:39:08 -05:00
Jukka Kurkela
ff76a236bf Rename lineTension back to tension (#7978) 2020-10-31 14:54:14 +02:00
Takuya Uehara
7b6737a209 Check index bounds of datasets for isDatasetVisible (#7986)
* Check index bounds of datasets
* Add test for isDatasetVisible
2020-10-31 08:10:17 -04:00
Jukka Kurkela
61d2227985 Tooltip: clear cached animations on initialize (#7983) 2020-10-30 18:43:46 -04:00
Jukka Kurkela
4f2511aff3 Relocate dataset defaults to defaults.controllers (#7979) 2020-10-30 18:34:32 -04:00
Dan Manastireanu
6869a41d40 feat: Draw tooltips with point styles. Closes #7774 (#7972)
* feat: Draw tooltips with point styles. Closes #7774

* chore: Add tooltip usePointStyle docs

* chore: Add tests and visual tests for tooltip usePointStyle

* chore: Update typescript with tooltip usePointStyle
2020-10-29 22:55:40 +02:00