559 Commits

Author SHA1 Message Date
Jacco van den Berg
ed68557a99
Make object notation usable for polarArea and radar (#10088)
* start to make object notation usable for polarArea
* enable object notation also for radar chart, test default key
2022-02-12 10:23:31 -05:00
Dimitri Papadopoulos Orfanos
a7d98fb1a0
Fix typos found by codespell (#10103) 2022-01-27 09:24:55 -05:00
Jukka Kurkela
1da9fdd519
radialLinear: fix positioning & scaling (#10021)
* radialLinear: fix positioning & scaling

* bloody pixels

* better radar fixtures
2021-12-23 20:47:36 +02:00
Jukka Kurkela
f1c99316a7
radialLinear: Hide pointLabels of hidden data (#10018)
* radialLinear: Hide pointLabels of hidden data

* filter after map
2021-12-22 23:09:54 +02:00
t-mangoe
961533c115
Add centerPointLabels option for linear radial scale (#9949)
* center point labels to slices in polar chart

* remove unnecessary comments

* put the code together in one line

* fix the code according to the code review

* Undo changes related to the createContext function

* add documentation and types.
2021-12-21 20:27:07 +02:00
Jukka Kurkela
0d250a1fbf
Fix setActiveElements behavior after a mouse event (#9992)
* Fix setActiveElements behavior after a mouse event

* Better variable name
2021-12-17 00:34:53 +02:00
Jukka Kurkela
ba6b446b04
Limit active element changes to chartArea (#9970)
* Limit active element changes to chartArea

* CC, remove duplicate ChartEvent interface

* CC2
2021-12-08 16:44:45 +02:00
Jukka Kurkela
d2d5f49953
Pass object from array as value to _fallback (#9969)
* Pass object from array as value to _fallback

* cleanup

* reduce changes

* reduce even more changes
2021-12-08 16:27:55 +02:00
Josh Kelley
d83f0467da
Improvements to tooltip positioners (#9944)
* Improve positioner types; allow overriding xAlign and yAlign

* More type improvements; pass in Chart as third parameter

* Expose chart as part of TooltipModel

I initially passed the Chart element as the third parameter to the positioner; however, Scale and LegendElement elements expose `this.chart`, and sample code for positioners used `this._chart`, so documenting the chart member and giving it a public name seems to make more sense.

* Update documentation

* Fix documentation

* Fix issues from code review
2021-12-06 07:39:06 -05:00
Josh Kelley
957ca837d5
Specify UTC time zone for the test suite (#9945)
The controller.bar/not-grouped/on-time test was failing on my computer because the date ranges happen to cross the end of Daylight Saving Time in the U.S., so chart was generated with one more hour of time than the test fixture expected.

Using moment-timezone to specify a fixed time zone with no DST seemed like the most robust fix. (Alternatively, I could pick a date range that doesn't change DST; that ought to work.)
2021-12-06 07:38:39 -05:00
Luuk de Vlieger
7784fbfded
Support "r" axis for non-intersecting interaction (#9919)
* Support "r" axis for non-intersecting interaction

* Extract some interaction functionality

* Remove whitespace and semicolons

* WIP: add interaction test

* Update documentation

* Fix test

* Add another test

* Update axis params

* Add additional axis check to binary search

* Update axis type
2021-12-05 08:57:07 -05:00
Jukka Kurkela
db995af158
Fix resolver caching issue when setting values (#9938) 2021-12-01 17:53:55 -05:00
Jukka Kurkela
93452501d1
Category: Track automatically added labels (#9921)
* Category: Track automatically added labels

* Use correct yAxisKey (does not change anything)
2021-11-29 23:38:11 +02:00
Jukka Kurkela
bccb1276f0
Detect detach/attach in same observation (#9876)
* Detect detach/attach in same observation

* Missing `!`, better tests

* reduce duplication
2021-11-27 21:46:00 +02:00
Jukka Kurkela
838d40b2c8
Synchronize data visibility with data changes (#9857)
* Synchronize data visibility with data changes

* avoid babel spread bug

* Simpler?

* one more

* simple enough, cc?
2021-11-18 00:13:31 +02:00
Jukka Kurkela
0c5db4973e
Fix inRange for full circle arc (#9871)
* Update misleading sample comment

* Fix inRange for full circle arc
2021-11-18 00:10:19 +02:00
Jukka Kurkela
0dc733a96c
Configure all datasets before updating any (#9872)
* Update misleading sample comment

* Configure all datasets before updating any
2021-11-18 00:09:25 +02:00
Jukka Kurkela
c8b885dd3e
Prevent proxying CanvasGradient in Node platform (#9861) 2021-11-15 20:09:43 -05:00
Josh Kelley
aac0bef060
Fix cleaning up metasets (#9656)
* Fix cleaning up metasets

I believe it's a mistake to only delete the metaset if it has a valid controller; see f191f2f5 for where this behavior was introduced.

This is a minimal fix for #9653; as discussed there, it may also be worth updating `updateHoverStyle`.

As of #7030, `this._metasets` should always be defined, so checking whether it's undefined is no longer necessary.

* Add a test covering metaset behavior

* Add a regression test for #9653; fix `toHaveSize` usage

* Fix test failure
2021-10-23 18:46:33 +03:00
Jukka Kurkela
0dcf025ab7
Support nested scriptable defaults for datasets (#9770) 2021-10-14 08:35:51 -04:00
Jukka Kurkela
9a47395010
Fix controller.getMinMax for stacked charts (#9766) 2021-10-14 00:24:38 +03:00
Jukka Kurkela
12c5f9a839
Support nested scriptable options for datasets (#9758)
* Support nested scriptable options for datasets
2021-10-13 08:41:22 -04:00
Jukka Kurkela
bc5e5cbf11
Disable animations for BasicPlatform (offcreen) (#9751)
* Disable animations for BasicPlatform (offcreen)
* Update types
2021-10-11 14:37:25 -04:00
Jukka Kurkela
0d4880e35c
Fix chart crashing when only min is defined (#9718) 2021-10-04 14:00:27 -04:00
Kurt Preston
60b094a9af
Fix chart crashing when max is defined but ticks are empty (#9641)
* Fix chart crashing when max is defined but ticks are empty

* Adding spec to reproduce scale bounds calculation error

Co-authored-by: Kurt Preston <kpreston@drw.com>
2021-10-04 20:30:16 +03:00
Jukka Kurkela
5587738fa4
Add sanity check for stepSize (#9679) 2021-09-24 18:13:10 -04:00
Jukka Kurkela
3f23aaba9a
Add sanity checks for scale options (#9624) 2021-09-06 07:51:18 +03:00
Shubham Aggarwal
4af9851584
Ensure that controllers derived from the bar controller work correct in stacked charts (#9587)
* change parameter of functions
* argument and parameter change in DatasetController.js
* changing variable name to proper convention
* Update controller.bar.js
2021-09-04 13:43:34 -04:00
Jukka Kurkela
50ad1637b0
Fix plugin event filtering of renamed events (#9613) 2021-09-04 13:41:47 -04:00
Jukka Kurkela
fca0309223
Detect attach/detach from any level (#9557) 2021-08-18 18:14:09 -04:00
Evert Timberg
7835973eb0
Keep track of parsed array changes when parsing===false (#9525)
* Keep track of parsed array changes when parsing===false

* Code review feedback
2021-08-14 09:07:58 -04:00
Jukka Kurkela
1c837a9c12
Fix _isPointInArea helper when no area is provided (#9489) 2021-07-28 07:57:35 -04:00
Evert Timberg
d0eac36381
Ensure getPrototypeOf will not crash on plugin options with no scopes (#9431)
* Ensure getPrototypeOf will not crash on plugin options with no scopes

* Code review improvements
2021-07-24 06:40:03 +03:00
Jukka Kurkela
0d0481d64c
Fix DomPlatform.isAttached (#9448) 2021-07-23 08:28:09 +03:00
Jukka Kurkela
ba2f158dc6
Fix interaction on partially visible bar (#9446) 2021-07-20 07:57:56 -04:00
Jukka Kurkela
bc7c58d46d
Fix: config.platform was ignored (#9442) 2021-07-20 07:51:16 -04:00
Evert Timberg
991f151f51
Linear scale handle min === max when abs(max) > Number.MAX_SAFE_INTEGER (#9433) 2021-07-18 11:14:33 -04:00
Jukka Kurkela
066130be4d
Decimation: Prevent buffer overflow (#9367) 2021-07-07 17:45:31 -04:00
Nico-DF
b4dee5507c
Adding threshold option to decimation plugin (#9327) 2021-07-04 13:19:35 -04:00
Jukka Kurkela
bb2bddcfd4
Timeseries: support panning (#9345)
* Timeseries: support panning

* Update

* Missing semi, reduntant variables.

* cc
2021-07-03 18:44:44 +03:00
Evert Timberg
3934935caa
Enable pointStyle for doughnut, pie, and polar area charts (#9341)
* Enable pointStyle for doughnut, pie, and polar area charts

* Fix whitespace
2021-07-01 14:15:06 -04:00
Evert Timberg
3a790329c6
Ensure correct item is clicked when a horizontal legend is in RTL mode (#9340) 2021-07-01 14:14:05 -04:00
Jukka Kurkela
c6976e8975
New plugin: subtitle (#9294)
* New plugin: subtitle

* Fix naive error for multiple charts
2021-06-20 07:34:55 -04:00
Jukka Kurkela
8f98515f45
Refactor radialLinear scale and renderText helper (#9276)
* Refactor radialLinear scale and renderText helper
* Undo the big move to make review possible
2021-06-18 14:12:27 -04:00
Jukka Kurkela
4002694e26
Fix: Don't use clip/unclipArea when clip: false (#9286) 2021-06-18 14:11:33 -04:00
Jukka Kurkela
4ac38d033e
Make sure data is parsed before updateElements (#9187)
* Make sure data is parsed before updateElements
* Add test
2021-05-30 14:51:11 -04:00
Jukka Kurkela
9326309afd
Fix error when swapping dataset locations (#9183) 2021-05-30 07:39:00 -04:00
Evert Timberg
c853ca6942
Allow setting a constance spacing between arc elements (#9180) 2021-05-29 17:47:44 -04:00
Jukka Kurkela
03eb826f8c
Stop mutating arc state while drawing (#9153)
* Stop mutating arc state while drawing

* No need for default values

* Nits

* Remove #9152

* Use correct endAngle for clipping
2021-05-25 08:13:37 -04:00
Jukka Kurkela
1d047355e7
Fix: Arc getCenterPoint when full circle (#9152) 2021-05-24 16:14:35 -04:00