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
61aea761f4
Unify signature of plugin hooks ( #8102 )
2020-11-28 09:45:43 +02: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
c2dd264fe8
Events: Only render when needed ( #8049 )
2020-11-13 17:35:40 -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
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
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
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
4f2511aff3
Relocate dataset defaults to defaults.controllers ( #7979 )
2020-10-30 18:34:32 -04:00
Jukka Kurkela
6dbb7e7446
Move config handling to a dedicated script ( #7939 )
...
* Split core.config.js out of core.controller.js
* Remove side effects from config.js
* Turn config into a class
* Refactor config merging as includeDefaults
2020-10-24 18:37:37 +03:00
Jukka Kurkela
58d1911d05
Add args.mode to before/after update plugin hooks ( #7949 )
2020-10-24 18:36:31 +03:00
Jukka Kurkela
f5c4f97504
Add interaction options ( #7922 )
...
* Add interaction options
* Add migration note
2020-10-19 07:24:06 -04:00
Jukka Kurkela
73b4e82fd5
Use Object.create(null) as merge target, to prevent prototype pollution ( #7917 )
...
Use Object.create(null) as merge target to prevent polluting `Object.prototype`
2020-10-18 13:31:01 -04:00
paul cheung
b31a815382
some minor typo fix ( #7913 )
2020-10-18 09:35:21 -04:00
Evert Timberg
4a191d5af9
Document and remove APIs that can be replaced by it ( #7900 )
2020-10-17 15:12:34 -04:00
Evert Timberg
a8a83d12cd
Provide APIs to set active (hovered) and tooltip elements. ( #7845 )
...
Provide APIs to set active (hovered) and tooltip elements.
Chart.setActiveElements will set the hovered items.
Chart.tooltip.setActiveElements will set the tooltip items.
2020-10-05 17:14:38 -04:00
Evert Timberg
8438da9e84
Provide method to lookup a chart from a canvas ( #7843 )
...
* Provide method to lookup a chart from a canvas
* Throw an error during construction if a canvas is in use
* Migration docs for new constructor behaviour
2020-10-04 11:08:38 -04:00
Evert Timberg
08b69fd974
Allow contextmenu (right click) events to trigger the onClick handler ( #7828 )
2020-10-01 08:47:09 -04:00
Jukka Kurkela
10f393a58d
Fix: maximum size and mouse position with styling ( #7816 )
...
Fix: maximum size and mouse position with styling
2020-09-26 13:18:35 -04:00
Jukka Kurkela
2f888172d4
Cache event offset coordinates ( #7795 )
2020-09-14 11:37:29 -04:00
LAU
c20360d08a
Better error message when importing charts incorrectly. ( #7790 )
...
* Created a better error message when chartjs can't find an element in the DOM.
Also, prevented an exception when trying to find the canvas assuming is an array. When it could also be null.
* Exception is not thrown anymore in getCanvas. Now this pr only prevents the
item.lenght exception and logs a better error when a chart cant be created.
* Deleted error description because i forgot chartjs is used in varois other ways than importing, also used isArray from helpers.core
* isArray check deleted because the type of the dom element received in getCanvas could be not only an array.
Co-authored-by: Lautaro Alonso Urtiaga <lautaro.urtiaga@10pines.com >
2020-09-14 09:57:50 -04:00
Jukka Kurkela
d5eaa12d96
Fix: update chart when attached ( #7758 )
2020-09-04 16:47:36 -04:00
Jukka Kurkela
4fa2c408f0
Remove duplicate code, clearer parameter names ( #7756 )
2020-09-04 16:46:44 -04:00
Jukka Kurkela
da33b1bb27
Fix shared option handling ( #7731 )
...
Fix shared option handling
2020-08-27 09:14:08 -04:00
Jukka Kurkela
2ea01d9beb
Include Chart.defaults always ( #7686 )
2020-08-03 12:33:21 -04:00
Jukka Kurkela
572b1c737e
Move register/unregister to core.controller ( #7626 )
2020-07-15 18:11:56 -04:00
Jukka Kurkela
7024aad38f
PluginService using registry ( #7590 )
...
PluginService using registry
2020-07-11 18:08:45 -04:00
Ben McCann
4cc3079e65
Add normalized option ( #7538 )
...
Add normalized option to time scales
2020-07-07 07:50:53 -04:00
Jukka Kurkela
6bd5ad5518
Generic registry for controllers, scales, elements and plugins ( #7435 )
...
* Generic registry for controllers, scales, elements and plugins
* Remove references to scale service
2020-07-06 17:38:04 -04:00
Jukka Kurkela
59a1af91ac
Replace horizontalBar with indexAxis: 'y' ( #7514 )
...
* Replace horizontalBar with indexAxis: 'y'
* Fix drawing of line for last x-position
* Consistently determine axis of scale
* Add test
2020-06-18 17:35:52 -04:00
Jukka Kurkela
c439d816fa
Fix initial animations ( #7511 )
...
* Fix initial animations
* CC
2020-06-16 17:56:42 -04:00
Evert Timberg
3ec3ac716f
Cleanup Event Handling code to match style of tooltip plugin. ( #7467 )
...
* Cleanup Event Handling code to match style of tooltip plugin.
Eliminates saving two arrays of items on the chart prototype. The `onHover`
callback now receives the wrapped event instead of the native one.
2020-06-08 07:31:00 -04:00
Jukka Kurkela
3c02846c00
Babel loose ( #7452 )
...
* Use loose mode for babel
* Add note about loose mode in performance docs
2020-06-05 17:03:54 -04:00
Jukka Kurkela
553ae385a8
Consistency: Use lower case for instances ( #7436 )
...
Consistency: Use lover case for instances
2020-05-28 17:37:19 -04:00
Jukka Kurkela
53f462830c
Cleanup resize complexity ( #7439 )
...
Cleanup resize complexity
2020-05-28 17:33:27 -04:00
Jukka Kurkela
f472a3f9a7
Remove proposal and obsolete features ( #7425 )
2020-05-26 19:16:23 -04:00
Evert Timberg
13b8924ac3
Legend onClick callback supports arrow functions ( #7410 )
...
#7409 Legend callbacks support arrow functions
The `Legend` is no longer implicitly found through `this` and instead
passed as an explicit argument to the callback functions.
2020-05-24 10:28:41 -04:00
Jukka Kurkela
37633c221a
Remove default export from controllers/index ( #7388 )
...
Remove default export from controllers/index
2020-05-21 16:44:49 -04:00
Samuel Gratzl
3e28825c0f
use direct imports instead of generic helpers import ( #7385 )
...
Split all helper functions in different files and import them directly where used
2020-05-21 16:41:56 -04:00
Jukka Kurkela
39eb39008d
Rename platform/platform to index removing default ( #7391 )
...
Rename platform/platform to index removing default
2020-05-21 16:36:06 -04:00
Jukka Kurkela
cfb5fba527
Delay animations until attached ( #7370 )
...
* Delay animations until attached
* Detect container detachment
2020-05-20 17:45:44 -04:00
Ben McCann
925b23da86
Better organize calls in main controller ( #7345 )
2020-05-18 09:49:07 -04:00
Ben McCann
a301ca148c
Add a scale.init method ( #7346 )
2020-05-12 16:44:40 -04:00
Evert Timberg
990fd03153
Revert "Use round when setting new chart size ( #7221 )" ( #7226 )
...
This reverts commit 8b01ab1326 .
2020-03-27 20:23:14 -04:00
emmcbd
8b01ab1326
Use round when setting new chart size ( #7221 )
2020-03-27 19:46:34 -04:00
Jukka Kurkela
b73b8f9863
Update running animations ( #7196 )
2020-03-14 19:20:59 -04:00
Ben McCann
5ef519e4d2
Shorten imports ( #7168 )
2020-03-01 09:57:24 -05:00
Jukka Kurkela
a3dddb45d9
Use global element hidden status for Pie charts ( #7156 )
...
Use global element hidden status for Pie / polarArea charts
2020-03-01 09:07:39 -05:00