Commit Graph

14 Commits

Author SHA1 Message Date
Akihiko Kusanagi
0ba5c70618
Support monotone cubic interpolation for vertical line charts (#9084)
* Support monotone cubic interpolation for vertical line charts

* Use more more intuitive veriable names
2021-05-14 17:07:26 -04:00
Akihiko Kusanagi
dffc086ad4
Fix for enabling monotone cubicInterpolationMode when tension is 0 (#9008) 2021-04-30 08:14:13 -04: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
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
ddfbcf777a
Update eslint-config-chartjs to v0.3.0 (#8406) 2021-02-10 08:21:39 -05:00
Jukka Kurkela
021561072b
Disable all plugins when options.plugins = false (#8098)
Disabling all plugins when options.plugins = false
2020-11-23 17:58:03 -05:00
Jukka Kurkela
ff76a236bf
Rename lineTension back to tension (#7978) 2020-10-31 14:54:14 +02:00
Sebastian Niemann
8b628c33b2
Turns off interpolation per default (#7386)
Co-authored-by: Sebastian Niemann <sn@wertpapiertreuhand.de>
2020-06-12 18:03:52 -04:00
Jukka Kurkela
9ddda713e4
Rename steppedLine to stepped (#7127)
Rename steppedLine to stepped
2020-02-19 18:13:40 -05:00
Jukka Kurkela
ce74eb76a1 Convert axis options from arrays to objects (#6773)
* Convert axis options from arrays to objects

* Updated all chart type defaults
* Throw errors when axis type or position are not specified
* Avoid raising unnecessary errors when merging options into the default configs

* Fix additional tests

* Ensure scale defaults are set if type is not explicitly defined

* Another step

* Include `scale` as `firstIDs.r`

* update docs

* Update for buildOrUpdateScales

* Update migration guide

* Add test back
2019-11-21 18:46:49 -05:00
Jukka Kurkela
7f97adf5a0 Move scale defining options up from ticks (#6738)
* Move scale defining options up from `ticks`
* Include `ticks.reverse` in v3-migration
2019-11-15 12:11:13 -05:00
Jukka Kurkela
30cbdc6a4d Convert element.line mock tests to fixtures (#6730) 2019-11-12 13:59:29 -05:00
Simon Brunel
4b421a50bf Add support to fill between datasets (#4008)
The `fill` option now accepts the index of the target dataset (number) or a string starting by "+" or "-" followed by a number representing the dataset index relative to the current one (e.g. `fill: "-2"` on dataset at index 3 will fill to dataset at index 1). It's also possible to "propagate" the filling to the target of an hidden dataset (`options.plugins.filler.propagate`). Fill boundaries `zero`, `top` and `bottom` have been deprecated and replaced by `origin`, `start` and `end`.

Implementation has been moved out of the line element into a new plugin (`src/plugins/plugin.filler.js`) and does not rely anymore on the deprecated model `scaleTop`, `scaleBottom` and `scaleZero` values. Drawing Bézier splines has been refactored in the canvas helpers (note that `Chart.helpers.canvas` is now an alias of `Chart.canvasHelpers`).

Add 3 new examples and extend utils with a pseudo-random number generator that can be initialized with `srand`. That makes possible to design examples starting always with the same initial data.
2017-03-18 11:08:57 +01:00
Simon Brunel
1ca0ffb5d5 Introduce unit test based on image comparison (#3988)
Attempt to make easier the creation of unit tests that check the drawing output. Until now, this was done by checking calls on a 'fake' context, which is hard to maintain (need to update pixel values by hands) and also not reliable when optimizing code (i.e. different calls sequence but same result).

As of now, it's possible to define 'auto' tests based on JSON/PNG fixtures: chart is generated from the JSON file and compared to the associated PNG image. The image diff is done using `pixelmatch`. As an example (and in preparation of the `filler` plugin), add auto tests for the line element `fill` options.
2017-03-05 09:49:12 -07:00