Commit Graph

3497 Commits

Author SHA1 Message Date
Evert Timberg
388918924f
Split Element type to it's own definition file (#8206) 2020-12-19 21:56:11 +02:00
Jukka Kurkela
dd382bc806
Split adapter types to their own definition file (#8205)
* Split adapter types to their own definition file
* Sort & separate
2020-12-19 14:03:26 -05:00
Evert Timberg
75fcd4fffa
Split geometric types to their own definition file (#8202)
* Split geometric types to their own definition file
* Re-export types
2020-12-19 13:39:35 -05:00
Jukka Kurkela
1110d4dd19
Update CI (#8204) 2020-12-19 12:52:18 -05:00
Jukka Kurkela
2dcd37f85c
Update dependencies (#8203) 2020-12-19 12:49:06 -05:00
Evert Timberg
a182cbed7b
Merge TS files into a single file to prevent circular loops (#8198) 2020-12-19 10:37:33 -05:00
LeeLenaleee
e529775d5e
Update showLine location in defaults (#8199)
Current defaults was wrong.
Working example: https://jsfiddle.net/Leelenaleee/vL7d6yp0/5/
2020-12-19 09:52:27 +02:00
stockiNail
f16e836c3d
Add color options to documentation and types where missing (#8196)
* fixes #8188 and #8189

* removes scriptable context sample with link to options page

* Removes <code> tags in markdown where not needed
2020-12-18 22:03:01 +02:00
Jukka Kurkela
7a2acebc28
Layout: enforce box limits, reject <0 chartArea (#8193)
* Skip chartArea boxes when chartArea <= 0
* Legend: limit to maxWidth/maxHeight
* Layout: enforce box limits, reject <0 chartArea
* Update legend fixtures
2020-12-18 12:56:04 -05:00
Josh Kelley
efbaf2c082
TypeScript updates (#8190)
* Update type definitions and docs for legends

* Fix types for onHover and onClick callbacks

core.controller.js's implementation also passes the Chart instance as `this`. However, that isn't documented, and it's my impression that Chart.js is moving away from passing items as `this`, so I didn't declare it in the type definitions.

* Allow multi-line ticks

* Stricter DeepPartial definition

The previous definition resolved to `{}` (which can allow primitives) if it was given a function, so it was far too broad for any `Scriptable<>` properties.

* Grammar and writing style

* Updates to animation docs

Document the `fn` option, since it's in the type definitions.

Fix callback usage to match example code.

* Fix AnimationEvent parameter

The onProgress and onComplete events were mistakenly declared as taking the standard DOM AnimationEvent.  (Should Chart.js's AnimationEvent be renamed to ChartAnimationEvent to avoid any possible ambiguity?)

* Allow false for disabling animations

* Add comments explaining the layout and usage of Rollup
2020-12-18 12:46:54 -05:00
Jukka Kurkela
04c45aacda
Make PointLabels color scriptable (#8194) 2020-12-18 12:36:38 -05:00
Jukka Kurkela
b2d5a5fa97
Update defaults and types for tick stroke (#8195) 2020-12-18 12:36:18 -05:00
UrielMaD
92646a973d
Radius validation for drawRadiusLine (#8191) 2020-12-18 12:35:13 -05:00
Evert Timberg
b54bd272fb
Move tooltip plugin hooks to the core Plugin type (#8160)
* Move tooltip plugin hooks to the core
* Try and use declaration merging for Plugin type
* Merge Plugin types
2020-12-17 18:10:29 -05:00
Jukka Kurkela
b10d994017
Hover: only update styles of changed elements (#8185) 2020-12-17 15:18: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
David Turbert
3c79d104d9
Add ArcElement to getting-started.md (#8174)
* fix: add ArcElement to getting-started.md
* fix: add all possible imports
* fix: add text to integration.md
2020-12-16 16:41:19 -05:00
LeeLenaleee
f191f2f5f9
Remove dataset while hovered (#8181) 2020-12-16 16:40:10 -05:00
Salman Kazmi
5e22f56865
added comma to fix syntax issue (#8177) 2020-12-16 10:35:54 -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
LeeLenaleee
e3953acf1e
default values for element background and border color were wrong (#8156) 2020-12-11 10:52:54 -05:00
Josh Kelley
dc00ed08cb
Update docs on printing (#8149)
From what I can tell from testing locally, Chrome doesn't reliably trigger resize events for the final print layout, so using `.resize()` with no parameters doesn't generally work.

I'm not sure if there are circumstances in which the original docs' suggestion of using `.resize()` with no parameters can work; if the original text should be deleted, I can do so.

I also noticed that the TypeScript type definitions for `.resize()` mark the parameters as required, even though the implementation and docs don't require them.
2020-12-10 16:25:00 +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
9b7eb5095a
CI: Conditionally run steps based on changes (#8132)
* CI: Run the `Package` step only when docs change

* Advanced conditionals

* Conditional coveralls

* Fix bunch of typos

* remove coveralls finished condition

* Revert "remove coveralls finished condition"

* Add curlys
2020-12-05 17:57:19 +02:00
LeeLenaleee
8192b2fd56
Clarification: barPercentage vs categoryPercentage (#8138)
Clarification of the docs to make it little less confusing after seeing the .1 hopefully.
Comes from #8137
2020-12-05 17:55:19 +02:00
dependabot[bot]
a7ff116547
Bump highlight.js from 10.3.1 to 10.4.1 (#8128)
Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 10.3.1 to 10.4.1.
- [Release notes](https://github.com/highlightjs/highlight.js/releases)
- [Changelog](https://github.com/highlightjs/highlight.js/blob/master/CHANGES.md)
- [Commits](https://github.com/highlightjs/highlight.js/compare/10.3.1...10.4.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-04 21:45:56 +02:00
Jukka Kurkela
68edcccb5e
Revert "New release workflow (#8127)" and fixes (#8131)
* Revert "New release workflow (#8127)" and fixes

* Bump version to 3.0.0-beta.7
2020-12-04 21:37:46 +02:00
Jukka Kurkela
ef82880541
Update release.yml (#8130) 2020-12-04 20:23:01 +02:00
Jukka Kurkela
39c2b92bb2
Fix the needs job name (#8129) 2020-12-04 19:46:17 +02:00
Jukka Kurkela
a98c34b858
New release workflow (#8127)
* New release workflow
* Set current version
* Use org secret
2020-12-04 12:18:31 -05:00
lab900-marcel-samyn
e08b17636b
[v3] Add locale to ChartOptions type (#8118)
* Add locale to ChartOptions type

* Adds locale options documentation

* fixed typo

* changes links to number format, linking the constructor

* changes to a better sentence

* changes to better sentence (2)

Co-authored-by: stock <stocki.nail@gmail.com>
2020-12-04 08:25:43 +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
LeeLenaleee
c3fbe5efc3
Fix/area fill and chart titles (#8113)
* fixed fill for area chart stacked and title for charts where it wasn't in plugins yet
* Chart defined in utils
* added radar skip points example in the overview to go to
2020-11-30 09:59:20 -05:00
Wenfang
8220caaa43
Update performance.md (#8107)
fixed typo
2020-11-28 16:57:17 -05: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
Mostafa Sameti
f014873864
fix color type & add background and border color (#8110) 2020-11-28 15:06:38 -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