Commit Graph

409 Commits

Author SHA1 Message Date
Evert Timberg
375d856a87 Expose formatNumber as a helper (#8683) 2021-03-21 11:04:27 +02:00
Jukka Kurkela
79cc6d3206 Use maxOverflow as minimum layout padding (#8650)
* Use maxOverflow as minimum layout padding

* fixes
2021-03-16 16:32:29 -04:00
Jukka Kurkela
420aa027b3 Exclude base-line from bar size (#8648)
* Exclude base-line from bar size

* lint

* add to types
2021-03-16 08:49:19 -04:00
Jukka Kurkela
85123ac074 Add option to turn off grouping of bar datasets (#8641)
* Add option to turn off grouping of bar datasets

* Disregard time offset
2021-03-14 11:27:57 -04:00
Evert Timberg
6ac89cbb25 Rename scale gridLines options to be clearer (#8628)
* Rename `options.gridLines` to `options.grid`

* Rename `offsetGridLines` to `offset`
2021-03-13 19:49:09 +02:00
Jukka Kurkela
7ec99c38c1 Move startAngle to scale options (#8593) 2021-03-08 13:36:54 -05:00
Jukka Kurkela
160534f913 Add 'single' mode for stacking (#8586)
* Add `'single'` mode for stacking

* Update fixture
2021-03-07 10:52:31 -05:00
Jukka Kurkela
7ccf9e2d4d Add grace option for linear scale (#8581)
* Add `grace` option for linear scale

* cc
2021-03-06 17:18:49 -05:00
Jukka Kurkela
8d6e87881a Relocate chart type and dataset type defaults (#8563)
* Relocate chart type and dataset type defaults

* Update types

* Separate overrides and descriptors

* Update derived sample, use merge for inherit

* Don't merge overrides

* Review update
2021-03-06 10:34:52 -05:00
Ben McCann
7c75310a0c Use null for skipped values instead of NaN (#8510)
* Use null for skipped values instead of NaN

* Document skipped values when parsing is false

* Update src/core/core.datasetController.js

Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com>

* Update src/core/core.datasetController.js

Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com>

* fix lint issue

* use isFinite

* revert change checking for pixel values

* ternary readability

* revert accidental paren movement

* test with parsing: false

Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com>
2021-02-24 18:20:11 -05:00
Jukka Kurkela
12e9020ab7 Remove unused getRingIndex from Doughnut (#8521) 2021-02-24 18:13:51 -05:00
Jukka Kurkela
b06cd36697 Rename cutoutPercentage to cutout + chores (#8514) 2021-02-24 16:58:01 -05:00
Jukka Kurkela
65bfacd9a5 Add outerRadius option to doughnut/pie (#8487) 2021-02-21 17:30:37 -05:00
Jukka Kurkela
329b826b74 Disable fastPathSegment when data is decimated (#8465) 2021-02-20 13:06:40 -05:00
Jukka Kurkela
5d5e48d01b Isolate properties / modes from animation options (#8332)
* Isolate properties / modes from animation options
* tabs, something wrong with the linter
* Update misleading variable name
2021-02-20 09:02:22 -05:00
Jukka Kurkela
cfd9c98575 Option resolution with proxies (#8374)
* Option resolution with proxies

* Remove plugin fallback to root options/defaults

* Update core plugins, reduntant font fallbacks

* Add some notes
2021-02-15 14:42:32 -05:00
Jukka Kurkela
6de5b3fa9e Small chores (#8408) 2021-02-10 18:06:48 +02:00
Jukka Kurkela
ddfbcf777a Update eslint-config-chartjs to v0.3.0 (#8406) 2021-02-10 08:21:39 -05:00
LeeLenaleee
b50fba3759 Fix/scatter tooltip mode (#8354)
* scatter tooltip should be point by default
* edited mode on better level and updated docs to be bit more clear
2021-01-30 16:22:01 -05:00
LeeLenaleee
bc312d0dbc feature: choose custom point style for bar legend display (#8341)
* add feature to choose custom point style for bar legend display
* add documentation and type
* the docs are in the right place now
2021-01-30 11:02:08 -05:00
Jukka Kurkela
ea34e8b814 Disable Path2D caching when chart is animated (#8319)
* Disable Path2D caching when chart is animated
* Add note to performance docs
2021-01-16 14:06:27 -05:00
Jukka Kurkela
0c48c1148a Fix resize bug of line / radar charts (#8266)
* Line: Make sure control points are re-calculated

* Radar: always set point on update
2021-01-05 07:24:12 +02:00
Jukka Kurkela
6ffc380c6a Line: Set points on resize (to reset Path2D cache) (#8250) 2020-12-30 08:31:44 -05:00
Jukka Kurkela
dd570f676d Line: Update points directly, when possible (#8246) 2020-12-29 09:02:03 +02:00
Jukka Kurkela
59000abd1d Use cached Intl.NumberFormat everywhere (#8244) 2020-12-28 12:31:19 -05:00
Evert Timberg
649f815328 Respect the set locale for in the pie/doughnut tooltips (#8142) 2020-12-06 18:17:22 -05:00
Jukka Kurkela
913a01a3a6 Move title, tooltip and legend to options.plugins (#8089)
* Move title, tooltip and legend to options.plugins

* Update tooltip.md

* Update legend.md and title.md

* Add migration notes

* typo

* Types

* Restore plurals

* One more s, restore tabs

* All plugins disabled

* lint

* cc
2020-11-25 08:50:12 +02:00
Jukka Kurkela
91fec4a397 Bubble: Use point.size() in getMaxOverflow (#8018) 2020-11-08 08:44:26 -05:00
Jukka Kurkela
34312fd66a Remove +-10px limit from bar controller (#8014)
* Remove +-10px limit from Bar controller
* Remove unused import, update tests
2020-11-06 08:07:15 -05:00
Jukka Kurkela
d393fa8b51 Normalize rotation and circumference resolution (#8015) 2020-11-06 08:06:38 -05:00
Jukka Kurkela
ff76a236bf Rename lineTension back to tension (#7978) 2020-10-31 14:54:14 +02:00
Dan Manastireanu
495c35950c Add borderRadius to bar charts. Closes #7701 (#7951)
* Add helper to parse border radius options
* feat: Implement borderRadius for bar charts
* chore: add demo of bar charts with border radius
* chore: document bar borderRadius
* chore: update typescript with bar borderRadius property
* fix horizontal borders test failing due to antialiasing
* chore: Add border-radius visual test
2020-10-26 10:05:24 -04:00
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
paul cheung
b31a815382 some minor typo fix (#7913) 2020-10-18 09:35:21 -04: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
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
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
Jukka Kurkela
06b5325778 Add maxWidth/maxHeight options for legend (#7852) 2020-10-06 07:41:16 -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
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
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
7633343c2f Fix: Update/draw only visible -regression (#7808) 2020-09-20 16:46:55 -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
da33b1bb27 Fix shared option handling (#7731)
Fix shared option handling
2020-08-27 09:14:08 -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
Evert Timberg
8fd7ef2901 Doughnut controller overrides (#7702) 2020-08-11 17:11:57 -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