Commit Graph

748 Commits

Author SHA1 Message Date
Jukka Kurkela
6a72bcbeca
Rename showLines to showLine (#7936) 2020-10-21 08:13:27 -04:00
Evert Timberg
bc11f10216
Rename elements to mark as elements, i.e. Arc -> ArcElement (#7924)
* Rename elements to mark as elements, i.e. Arc -> ArcElement
* Rename RectangleElement to BarElement
* Also updates options.elements.rectangle to options.elements.bar
2020-10-20 08:18:56 -04:00
Jukka Kurkela
f5c4f97504
Add interaction options (#7922)
* Add interaction options
* Add migration note
2020-10-19 07:24:06 -04:00
Evert Timberg
ac68593873
Block incorrect keys in merge code to prevent prototype pollution (#7919)
* Port fix from v2

* Port test

* Test both merge and mergeIf
2020-10-18 21:16:20 +03: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
Evert Timberg
c68ec57672
Reduce tooltip implied padding at top and bottom edges of the canvas (#7908)
* Allow the tooltip to get closer to the canvas edge

Closer to the top & bottom by considering (height/2) instead of height.

* Update missing options in TS types

* Remove unneeded brackets
2020-10-18 16:51:48 +03:00
Evert Timberg
30d09f4701
Bar chart base value overrides (#7904)
* Bar chart base value overrides
* Ensure that `base` is marked as indexable and scriptable in the docs
2020-10-17 16:15:40 -04:00
Evert Timberg
c22d3bedea
Ability to fill a line from a specified value along an axis (#7905) 2020-10-17 15:46:56 -04:00
Jukka Kurkela
ff811aaddf
Fix: beginAtZero for logarighmic (#7899) 2020-10-16 10:32:37 -04:00
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
cdd742d752
Polar Area elements.arc.angle option now returns degrees (#7871)
* Polar Area `elements.arc.angle` option now returns degrees
* Update wording of migration docs
2020-10-12 10:56:03 -04:00
Evert Timberg
3f89c25895
Ability to toggle individual bar visibility (#7870) 2020-10-12 10:22:55 -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
f1ed2ee932
beginAtZero support for logarithmic (#7862) 2020-10-07 17:37:10 -04:00
Evert Timberg
56a8a23d54
Add new option, skipNull to bar charts that enables skipping null values (#7849)
* Add new option, `skipNull` to bar charts that enables skipping null
or undefined values.

* Address code review feedback

* Fix windows CI lint issues
2020-10-06 07:33:24 -04:00
Evert Timberg
168965fa38
Enable custom sorting of the legend items (#7851) 2020-10-05 22:15:38 -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
df0b79b9cc
JS test files should have tabs to correctly lint (#7844) 2020-10-04 07:49:14 -04:00
Evert Timberg
9b204eb278
Enable per-dataset circumference and rotation for pie/doughnut charts (#7833)
* Enable per-dataset circumference and rotation for pie/doughnut charts
* Convert `circumference` and `rotation` options to degrees
2020-10-03 16:47:39 -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
c4243683fa
Make dataset animations obey chart level disable (#7820) 2020-09-28 09:51:28 -04:00
Samuel Gratzl
391e4b6f2e
flat helpers (#7806)
* generate a flat helpers package
* move helpers built files to dist
* upgrade docs for flat helpers
2020-09-28 09:11:55 -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
2f888172d4
Cache event offset coordinates (#7795) 2020-09-14 11:37:29 -04:00
Jukka Kurkela
1cc8d50bc9
Fix: relative position in FF (#7792)
* Fix: relative position in FF
* Add tests
2020-09-13 17:20:14 -04:00
Jukka Kurkela
d5eaa12d96
Fix: update chart when attached (#7758) 2020-09-04 16:47:36 -04:00
Jukka Kurkela
effe988bbf
Reduce code duplication and sort generated ticks (#7747)
* Reduce code duplication and sort generated ticks
* Add test
2020-09-02 08:09:39 -04:00
Jukka Kurkela
da33b1bb27
Fix shared option handling (#7731)
Fix shared option handling
2020-08-27 09:14:08 -04:00
Jukka Kurkela
d561486b4e
Revert "Preserve object prototypes when cloning (#7381)" (#7727)
This reverts commit 51be344717.
2020-08-24 08:15:56 -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
dd261b22f9
Use interpolation in fill: 'stack' (and fix interpolation) (#7711)
* Add tests and fix _boundSegment
* Use interpolate for finding points below
* Remove _refPoints logic (getTarget in draw)
2020-08-16 11:18:46 -04:00
Jukka Kurkela
689befa807
Make sure bezier control points are updated (#7710)
* Make sure bezier control points are updated
* Test
2020-08-15 17:06:03 -04:00
Jukka Kurkela
6ad17c0294
Stop bundling specs for improved coverage (#7709) 2020-08-14 09:15:18 -04:00
Jukka Kurkela
6f83c55be5
'stack' mode for filler (#7705)
'stack' mode for filler
2020-08-11 09:31:18 -04:00
Samuel Gratzl
4eeed6e876
WIP: TypeScript types (#7668)
First version of types
2020-08-04 16:52:57 -04:00
Jukka Kurkela
9c27f74801
Export extensible classes in ESM compatible way (#7650)
* Export extensible classes in ESM compatible way
* Export collection helperrs
* Remove reduntant registry assignment
2020-08-03 12:33:41 -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
7f4b74d956
minBarLength at base going both ways (#7642) 2020-07-17 13:29:43 -04:00
Ben McCann
2564e708b5
Determine unit automatically in test (#7637) 2020-07-17 07:53:40 -04:00
Ben McCann
8d837f977d
Add test fixture for financial sample (#7635)
Add test fixture for financial sample
2020-07-16 18:47:40 -04:00
Jukka Kurkela
dc5f88b620
Animation events sanity (#7629) 2020-07-16 13:30:07 -04:00
Jukka Kurkela
c51af9f13e
Fix category scale tick placement with autoSkip (#7622) 2020-07-15 18:12:32 -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