* Enable override settings for the axis border - #4041
Adds two new options to the cartesian axis: `borderColor` and `borderWidth`
which are used to control the border drawn at the edge of the axis area.
If these options are not set, the first grid line settings are used.
* Correct spelling
* 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
* Early data parsing + stacking by value
* Review comments
* review comments
* Remove reduntant parsing
* Couple CC warnings
* Optimize filterBetween
* More migration info
Add functionality to give pie & doughnut datasets a weight attribute, which affects the relative thickness of the dataset when there are multiple datasets in pie & doughnut charts. The default weight of each dataset is 1, providing any other numerical value will allow the pie or doughnut dataset to be drawn with a thickness relative to its default size.
For example a weight of 2 will allow the dataset to be drawn double its typical dataset thickness. Note that the weight attribute will only affect a pie or doughnut chart if there is more than one visible dataset. Using weight on a pie or doughnut dataset when there is only one dataset on the chart will have no affect.
- Remove `Math.round` in the category scale code
- Add `helpers._alignPixel` to align grid/tick/axis border lines
- Fix grid/tick/axis border line calculation
- Add a check of the width of the axis border
- Refactor core.scale code
- Calculate the vertices of the shapes so that they are inscribed in the circle that has the radius of `pointRadius`
- Remove `translate()` and `rotate()` to fix the regression introduced by #5319
- Refactor `rectRounded` for better performance
The bar `backgroundColor`, `borderColor`, `borderWidth` and `borderSkipped` options are now scriptable (unit tests, docs and a basic sample). Also fix the gulp task that generates the documentation on Windows.
JSON doesn't support functions which are needed to create scriptable options, so implement a very basic method to load a JavaScript file exporting the config in `module.exports`. Also rename test sources (remove the `jasmine.` prefix), cleanup `karma.conf.js` and add an example .js fixture config (bubble radius option).
Replace the old style canvas "mock" context checks by image based unit tests which are easier to maintain and allow more flexibility in the drawing logic since we are not testing the context calls but the final painted result.
* added 'angle' option to polar charts. image comparison test is work in progress; not currently passing
* removed unnecessary variable assignment
* code cleanup based on PR; for 'angle' option on polarCharts
* Made polar chart image comparison test pass by removing debug flag. Also explicitly marked _computeAngle as private.
* Removed visibleCount computation in polar chart
* split out code related to updating the radius in polar chart's update function, into it's own 'updateRadius' function
* made updateRadius method private
* fix linting error
* updated polar charts to read custom angles from "chart.options.elements.arc.angle" instead of "chart.options.angle"
When `barThickness: undefined|null` (default), we compute an optimal sample size based on the smallest tick interval reduced to prevent any bar to overlap (bar equally sized). Also added support for a special `barThickness: 'flex'` value (previous default) that globally arranges bars side by side to prevent any gap when percentage options are 1 (variable bar sizes).
Remove the special drawing for an undefined zero grid line since it causes issue when the first tick is not aligned on the scale extremity (ie only linear scales now display a special grid line for the origin). Hide scales in the filler plugin unit test fixtures to avoid future failures due to changes unrelated to the tested features.
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.
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.