Commit Graph

1109 Commits

Author SHA1 Message Date
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
Jacco van den Berg
e7aec8c301 add beforeDestroy hook (#9933)
* add `beforeDestroy` hook
* add documentation of destroy lifecycle, add `afterDestroy` hook and deprecate destroy
2021-12-05 09:05:18 -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
Jacco van den Berg
6d3a1c5fa6 Feature/active elements on top (#9920)
* add flag to draw active items on top

* add documentation and types

* remove redundent check

* added test

* resolve linting errors

* increase tollerance

* remove axes for better test, hope no tolerance needed
2021-12-05 08:56:53 -05:00
Jukka Kurkela
6552a01265 Stop modifying options in interaction handlers (#9939)
* Stop modifying options in interaction handlers
* Don't use object spread
2021-12-01 17:55:58 -05:00
Evert Timberg
7cbc47becc Chart area boxes receive 0 margin during the final layout process (#9915) 2021-11-28 10:25:27 -05: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
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
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
6a250de81d Add chart, p0.raw, p1.raw to segment context (#9761)
* Add chart, p0.raw, p1.raw to segment context

* Types
2021-10-15 15:56:29 -04: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
10292c6912 Linear: determine grace amount from range (#9719) 2021-10-04 17:43:04 -04:00
Jukka Kurkela
e1ae5e6abf Add layout.autoPadding option (#9716) 2021-10-04 14:01:10 -04:00
Jukka Kurkela
0d4880e35c Fix chart crashing when only min is defined (#9718) 2021-10-04 14:00:27 -04:00
Evert Timberg
8e68481ec4 Remove const me = this pattern (#9646) 2021-09-14 07:37:22 -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
Alex Van Liew
f8a9d60fd5 [feat] support crossAlign on mirrored y-axis (#9563) 2021-08-18 07:48:36 -04:00
Jukka Kurkela
4d99658155 Remove chart.scale property (always undefined) (#9556) 2021-08-17 07:52:04 -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
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
cf951ac611 Add ability to hide specific data element (#9450) 2021-07-21 07:08:02 -04: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
Jacco van den Berg
259f8e8471 lower default value of grid z index so it draws behind chart elements (#9426) 2021-07-16 11:16:31 -04:00
Jukka Kurkela
0094a58ef1 Properly update stacks when datasets index changes (#9425) 2021-07-16 07:15:54 -04:00
Evert Timberg
11045a731a Fix center axis title positions (#9413)
* Fix the title positions for center positioned axes

* Handle center position for vertical axes

* Tests
2021-07-15 08:20:22 -04:00
Evert Timberg
df49447867 Limit Math.asin inputs to the range [-1, 1] (#9410) 2021-07-14 09:14:29 +03:00
Jukka Kurkela
31be610001 Fix stacked box dimension calculation with weights (#9394)
* Fix stacked box dimension calculation with weights

* Fix typo in filename
2021-07-12 07:45:03 -04:00
Jukka Kurkela
47d4b04836 Layout: support box stacking (#9364)
* Layout: support box stacking

* Add stackWeight and sample

* Cleanup, update docs and types

* Avoid div0

* missing semi
2021-07-11 06:23:42 -04:00
Jukka Kurkela
87bd5785ff Legend: fix layout padding handling (#9290) 2021-06-19 18:31:33 -04:00
Jukka Kurkela
a8d083ac24 Apply maxTicksLimit to grid when ticks are hidden (#9277) 2021-06-18 14:11:55 -04:00
Jukka Kurkela
4002694e26 Fix: Don't use clip/unclipArea when clip: false (#9286) 2021-06-18 14:11:33 -04:00
Evert Timberg
dc373f3aaa Replace [...set] with Array.from(set) (#9260) 2021-06-12 20:34:54 +03:00
Evert Timberg
9db3680440 null or undefined should skip grid lines in the time scale (#9252)
* `null` or `undefined` should skip grid lines in the time scale

* Refactor implementation per code review
2021-06-12 10:47:14 -04:00
Evert Timberg
599e23abfd Tick backdrop padding is not scriptable (#9191)
* Tick backdrop padding is not scriptable
* Remove unneeded change
* Update _scriptable for callback
2021-05-30 16:59:49 -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
Jukka Kurkela
188da82206 Fix clearStacks with custom scaleId (#9170) 2021-05-28 07:36:59 +03:00
Jukka Kurkela
77cfac1785 Ignore items outside chart area for interaction (#9171) 2021-05-27 17:15:50 -04:00
Evert Timberg
087f9c30c5 Improved error message when no date adapter provided (#9147) 2021-05-22 08:59:02 -04:00
Jukka Kurkela
a6f0b37dfe Further improve linear tick collision estimation (#9129)
* Further improve linear tick collision estimation

* More tolerance

* Re-create fixtures

* And more tolerance
2021-05-20 10:01:47 +03:00
Evert Timberg
78009390ad Show correct decimal places when using count but min is not an integer (#9122)
* Show correct decimal places when using count but `min` is not an integer
* Fix lint issues
2021-05-19 18:31:15 -04:00
Jukka Kurkela
749d1fc942 Fix animations when data is replaced (#9120) 2021-05-18 19:24:35 -04:00