Commit Graph

2709 Commits

Author SHA1 Message Date
Angus Comrie
7e429a8fc6 Add 'middle' interpolation to stepped plots (#5908) 2018-12-18 14:47:24 +01:00
Akihiko Kusanagi
db8f6c38dc Add support for 'inner' border for arc elements (#5841) 2018-12-18 13:58:02 +01:00
Dave Salomon
4fb259e3ac Add support for hiding axis when all linked datasets are hidden (#5885)
When `display: 'auto'`, the axis is visible only if at least one associated dataset is visible.
2018-12-18 09:33:03 +01:00
Simon Brunel
52b9793ba0 Use HTTPS instead of HTTP for URLs supporting it 2018-12-17 07:50:02 +01:00
当耐特
2388eeaf38 Add omi-chart to extensions.md (#5912) 2018-12-15 12:27:08 +01:00
Ben McCann
3a29b99e3b Use HTTPS in documentation links where possible (#5915) 2018-12-15 11:28:17 +01:00
Simon Brunel
2a97ec21c5
Migrate from Browserify to rollup (#5904)
Browserify isn't optimal bundling Chart.js because it adds too many internal wrappers, doesn't handle external/global dependencies and doesn't provide a way to generate ESM builds. Therefore, it seems the right choice to switch to rollup, so move all the build process in `rollup.config.js` and make Gulp to execute `rollup -c`.

We also had to switch to Terser instead of UglifyJS because this last one contains a breaking bug. Note that tests now use the exact same rollup config as our builds (the minified one) to ensure that the bundling and minification steps don't break anything. Finally, replace the `gulp watch` task by `gulp build --watch` to be consistent with the other `unittest` and `docs` watching syntax.
2018-12-14 20:20:43 +01:00
Simon Brunel
f2a9e66b73 Remove innerHTML usage from our DOM platform (#5909)
Prevent "Unsafe assignment to innerHTML" reported by Firefox when submitting addon to their store.
2018-12-13 21:19:42 -05:00
Steve Gray
69fcba029b Remove autoSkip logic to always display last tick (#5891)
This changes the behavior of `autoSkip` so that it does not force the
display of the last tick. If the last tick can be displayed with equal
spacing to the rest of the ticks, it will be. Otherwise, it is not.
2018-12-09 12:56:51 -05:00
Akihiko Kusanagi
40495ec9d0 Fix the rounding issue of floating point numbers in category scale (#5880)
- 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
2018-12-09 11:34:34 +01:00
Akihiko Kusanagi
7c45fdac0d Remove gaps on the left and right when the axis offset is true (#5884) 2018-12-05 17:59:07 +01:00
Akihiko Kusanagi
bfa635e55d Fix docs about bar chart indexable options (#5876) 2018-12-04 09:10:15 +01:00
generic-github-user
5797e03421 Refactor data generation in scatter basic example (#5877)
Replace repeated function call with compact function, generateData
2018-12-04 09:07:35 +01:00
Simon Brunel
3cb2d7050e
Remove gulp-connect and add jsdelivr/unpkg paths (#5875) 2018-12-01 08:35:43 +01:00
Simon Brunel
be8d78a900
Make Chart.controllers.* importable (#5871)
`controllers.*.js` and `core.datasetController.js` are now importable (no more function export), that's why there is so many changes mainly due to one indentation level removed. Split code for `bar/horizontalBar` and `doughnut/pie` in separate files, added a global controllers import (`src/controllers/index.js`) and add tests to check that all dataset controllers are correctly registered under `chart.controllers.{type}`.
2018-11-29 21:06:34 +01:00
Akihiko Kusanagi
c84d249035 Fix test failures on Windows (#5872) 2018-11-29 21:05:36 +01:00
Akihiko Kusanagi
ecfa7b24c6 Add support for CanvasPattern and CanvasGradient in tooltip (#5869) 2018-11-29 13:52:56 +01:00
Simon Brunel
aa652df240
Deprecate Chart.{Type} classes (#5868)
It looks like these classes are a legacy from version 1 but we actually never promoted their usage. Instead, the regular way to create a chart is to set the type in the config, for example: `new Chart(ctx, {type: 'bar'})`. Some types are actually missing (no `Chart.HorizontalBar` or `Chart.Pie`) but it's also not scalable because it can easily conflict with other classes scoped under the `Chart` namespace.
2018-11-29 07:56:20 +01:00
Akihiko Kusanagi
d6ac7d8a80 Fix cut off tick labels in radial scale (#5848)
Fix the issue that the topmost tick label and the bottom of the chart area are cut off with a radial scale.
2018-11-28 08:35:15 +01:00
jedrekdomanski
bbca2fc789 Enhance documentation for bar specific scale options (#5854) 2018-11-28 07:56:41 +01:00
Akihiko Kusanagi
1f2fa5c90c Adjust the size of rectRounded/rectRot point to fit pointRadius (#5858)
- 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
2018-11-28 07:53:41 +01:00
Akihiko Kusanagi
241499d27f Make getHoverColor() return the original value if it is CanvasGradient (#5865) 2018-11-27 19:54:03 -05:00
Jukka Kurkela
f5437fe548 Fix nearest interaction mode to return all items (#5857)
Return all items that are at the nearest distance to the point and add unit tests for nearest + axis: 'x' and nearest + axis: 'y'
2018-11-27 16:26:41 +01:00
Stef Louwers
08447e9e19 Draw radial scale angle lines before tick labels (#5855)
Moved drawing of radial lines before drawing the tick labels, such that the radial lines are not drawn on top of the tick labels and their backdrop.
2018-11-27 15:14:41 +01:00
Akihiko Kusanagi
0351a88a63 Add support for gridLines/angleLines borderDash for polarArea/radar charts (#5850) 2018-11-26 08:57:31 +01:00
chtheis
b68341d9b8 Correct calculation of padding in percent (#5846) 2018-11-21 09:35:49 +01:00
Akihiko Kusanagi
bc494e0a81 Use empty labels for tests so as not to be affected by the font width (#5842) 2018-11-21 08:58:39 +01:00
Evert Timberg
f6d9a39cb8 Fix axis line width when option is an array (#5751)
When the axis lineWidth setting is set to an array, use the first item when determining the size of the axis area.
2018-11-18 09:45:41 +01:00
Kakhaber
ab06831f69 Is node shadow root check improved (#5828) 2018-11-18 09:36:21 +01:00
Simon Brunel
75aa44eef6
Upgrade dev dependencies to reduce vulnerabilities (#5840) 2018-11-18 09:33:34 +01:00
Thomas David Baker
ecf64d361d Correct spelling mistake. (#5831)
Use a simpler phrase for this heading.
2018-11-15 09:41:02 -05:00
Jan Tagscherer
3ea93a09f2 Add regression test for legend layout issue (#5776) 2018-11-14 11:12:57 +01:00
Jan Tagscherer
56b30e1db1 Check pixel values using the pixel proximity matcher (#5833) 2018-11-14 11:08:40 +01:00
Simon Brunel
ae80e14c51
Make bar styling options scriptable (#5780)
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.
2018-11-12 21:15:37 +01:00
Akihiko Kusanagi
637c2176ec Support decimal stepSize (#5786) 2018-11-12 21:12:09 +01:00
Jan Tagscherer
7e62913cfc Change .editorconfig to include final newlines (#5827) 2018-11-12 21:06:59 +01:00
Akihiko Kusanagi
e730f87e15 Fix legend item layout issue (#5816) 2018-11-12 08:57:16 +01:00
Akihiko Kusanagi
9140ef7e67 Add a link to chartjs-plugin-colorschemes to extensions.md (#5813) 2018-11-05 18:56:29 +01:00
Bart Deslagmulder
f40abe9244 Consistent use of punctuation and quick review in docs (#5796) 2018-11-02 08:46:06 +01:00
Akihiko Kusanagi
f74699a591 Fix offsetGridLine behavior with a single data point (#5609) 2018-11-02 08:44:10 +01:00
Jordan Ephron
6bea6aba7b Document padding option for ticks configuration (#5795) 2018-11-01 16:28:11 +01:00
Hendrik Röhm
820d28907b Remove dead and broken code from gulpfile (#5794)
In commit c216c0af76, the task unittestWatch was removed. However, the watch task links to it, when executed with the test flag. As watching the unittest is possible with `gulp unittest --watch`, this code is not needed anymore and thus removed.
2018-11-01 16:26:20 +01:00
Akihiko Kusanagi
cb14217c88 Add error margin for detecting if a point or line is in the chartArea (#5790) 2018-10-27 17:55:10 +02:00
Evert Timberg
b3b5c7de4f Ensure that when we check typeof x == 'number' we also check instanceof Number (#5752) 2018-10-22 09:52:05 +02:00
Ben McCann
81b4b87666 Radar code cleanup (#5624) 2018-10-21 21:56:57 +02:00
Simon Brunel
2dbf1cd1af
Add support for *.js test fixture config (#5777)
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).
2018-10-20 11:38:48 +02:00
Alexandre Dubé
5816770e45 Introduce the 'minBarLength' bar option (#5741) 2018-10-18 22:28:56 +02:00
Evert Timberg
f815dd5196 Ensure that when the time axis accesses data.labels it actually exists (#5750) 2018-10-18 21:28:49 +02:00
Niladri Dutta
dfbb57468f Add 'parser' instead of deprecated 'format' in samples (#5769) 2018-10-16 23:12:51 +02:00
Simon Brunel
d7eab1b994 Bump version to 2.7.3 2018-10-15 18:48:00 +02:00