Commit Graph

1059 Commits

Author SHA1 Message Date
Jukka Kurkela
c9b38b63dc Share min sample size with all bars on same scale (#7897)
Share min sample size with all bars on same scale
2020-10-16 08:04:22 -04:00
Evert Timberg
1ca60808b4 Shorten alignment settings for axes (#7886)
* Rename crossAlignment to crossAlign
* Update alignment to align for cartesian axes
2020-10-14 08:27:54 -04:00
Evert Timberg
29f1358328 Cartesian axis label cross alignment (#7874)
* Refactor Y axis alignment to it's own method
* Label Cross alignment
* Add documentation of new setting
* Update docs with live sample
2020-10-12 10:22:13 -04:00
Evert Timberg
dc4eac6323 Cartesian axis text alignment (#7846)
* Generate textBaseline per tick label
* Enable configuration of tick alignment
* Add image based tests of text alignment options
2020-10-10 11:38:55 -04:00
Jukka Kurkela
06b5325778 Add maxWidth/maxHeight options for legend (#7852) 2020-10-06 07:41:16 -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
Jukka Kurkela
8d36927b29 Normalize context creation for option resolution (#7847)
* Normalize context creation for option resolution
* Pass mode to _computeAngle
2020-10-05 09:03:16 -04:00
Jukka Kurkela
1a9b452cda Limit pixel values further to 16bit integer range (#7848) 2020-10-05 08:37:12 -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
Jukka Kurkela
07d50a59bc Clone cached options if enableOptionSharing!=true (#7837)
Clone cached options if enableOptionSharing!=true
2020-10-02 08:15:47 -04:00
Jukka Kurkela
2ac0436bd4 Use full height for fullWidth box when left/right (#7836)
Use full height for fullWidth box when left/right
2020-10-02 08:13:04 -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
c4243683fa Make dataset animations obey chart level disable (#7820) 2020-09-28 09:51:28 -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
8cdc60ccd1 [perf] Update/draw only visible line/points (#7793)
* Restore count parameter to updateElements
* [perf] Update/draw only visible line/points
* CC
2020-09-15 18:57:31 -04:00
Jukka Kurkela
17e27e16cc Limit pixel values to 32bit integer range (#7800) 2020-09-15 15:33:59 -04:00
Jukka Kurkela
2f888172d4 Cache event offset coordinates (#7795) 2020-09-14 11:37:29 -04:00
Jukka Kurkela
2563ff174e Merge x/y interaction mode functions (#7794) 2020-09-14 11:36:35 -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
9427398b3c Fix hover-out regression (#7785) 2020-09-11 10:46:25 -04:00
Jukka Kurkela
cb8aae9b98 Cache Intl.NumberFormat instances (#7755)
* Update dependencies
* Cache Intl.NumberFormat instances
2020-09-04 16:49:38 -04:00
Jukka Kurkela
d5eaa12d96 Fix: update chart when attached (#7758) 2020-09-04 16:47:36 -04:00
Jukka Kurkela
c749fbdf5f Fix the parameter order of before/afterEvent (#7757) 2020-09-04 16:47:08 -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
f5b4a0fa3c Improve test coverage and fix minor issues found (#7713)
* Registry
* Element
* Animation
* Animations
* Animator
2020-08-17 10:03:15 -04:00
Jukka Kurkela
f79d609548 Add offset option for arc (#7691)
* Add offset option for arc
* Finishing touches
2020-08-05 07:35:28 -04:00
Jukka Kurkela
2ea01d9beb Include Chart.defaults always (#7686) 2020-08-03 12:33:21 -04:00
Jukka Kurkela
e756fb93a3 Resolve fonts through options.font (#7674)
* Resolve fonts through options.font
* Remove defaultRoutes from Tooltip fonts
2020-08-03 12:32:58 -04:00
Jukka Kurkela
dc5f88b620 Animation events sanity (#7629) 2020-07-16 13:30:07 -04:00
Jukka Kurkela
af855d7646 Fix remaining issues in samples (#7625)
* Fix remaining issues in samples
* Update migration guide
* Use element instead
* Update tooltip.md
2020-07-16 13:28:12 -04:00
Jukka Kurkela
d3eaf2ff2a Leftover defaults (#7628)
* Remove leftover placeholders from defaults
* Add migration note about moved plugin defaults
2020-07-15 18:13:10 -04:00
Jukka Kurkela
572b1c737e Move register/unregister to core.controller (#7626) 2020-07-15 18:11:56 -04:00
Ben McCann
426d8debba Tooltip: add dataPoint and rename value to formattedValue (#7618)
* Tooltip: add dataPoint and rename value to formattedValue
* Add a test
2020-07-14 17:40:32 -04:00
Jukka Kurkela
6deafdb4d4 Registry fixes (#7617)
* Fix documentation for classical extensions
* Tests and fixes for registry
2020-07-13 17:43:30 -04:00
Jukka Kurkela
91164e8c66 Line hide (#7612)
* Add support for description in fixtures
* Update datasetController to draw active(s) last
* Handle hiding of line by borderWidth
* Disable filling of scatter charts by default
* Make radar chart consistent with line
2020-07-13 13:20:05 -04:00
Jukka Kurkela
b8ad2a6a0a Registry bugs (#7608)
* Stop failing early when no scales are registered
* Move filler defaults
* Move legend defaults
* Remove legendHitBoxes from title
* Move @kurkle/color to devDependencies
2020-07-13 09:41:42 -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
Ben McCann
87c59fea73 Fix padding for labels (#7572) 2020-07-06 09:34:56 -04:00
Ben McCann
09a6aea396 Mark parameter as optional (#7530) 2020-06-20 07:31:04 -04:00
Jukka Kurkela
6cf97859f0 Consistently resolve element options (#7520)
* Consistently resolve element options
* Add tests
2020-06-18 17:44:55 -04:00
Jukka Kurkela
40871b0062 Parse from custom properties in data (#7489)
* Parse from custom properties in data
* Resolve CC issues
* Review update
2020-06-18 17:36:53 -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
Jukka Kurkela
1bfd1daa75 Relocate array utils to helpers.collection (#7498) 2020-06-12 18:02:12 -04:00
Evert Timberg
fc65679a07 Use consistent option context for scales (#7499) 2020-06-12 18:01:48 -04:00
Jukka Kurkela
41f0f12af8 Remove unused _scaleStacked cache (#7494) 2020-06-12 17:55:51 -04:00
Jukka Kurkela
026482a0cf Correctly determine min/max for Float Bar (#7398) 2020-06-09 17:15:05 -04:00