Akihiko Kusanagi
bf094c59db
Assign unique scale IDs ( #6291 )
2019-06-09 15:45:12 +08:00
Akihiko Kusanagi
70b32ff20e
Support rotation for pointStyle image ( #6287 )
2019-05-24 09:35:47 +02:00
Akihiko Kusanagi
bd3ab17ef7
Add tests and a sample for radar scriptable line options ( #6263 )
...
* Add tests and a sample for radar scriptable line options
* Improve image tests
2019-05-21 18:06:12 -04:00
Jukka Kurkela
abbddd1298
Allow specifying labels in time scale options ( #6257 )
2019-05-21 13:36:16 +02:00
Akihiko Kusanagi
03a3199306
Treat null as NaN in radialLinear scale ( #6282 )
2019-05-21 11:50:38 +02:00
Akihiko Kusanagi
cfcdcccc32
Support boundary filling modes in radialLinear scale ( #6281 )
2019-05-21 11:15:33 +02:00
gwyneblaidd
7d8526f691
Add support for floating bar chart ([start, end]) ( #6056 )
2019-05-21 10:54:13 +02:00
Akihiko Kusanagi
4f04ee5d77
Keep lines on the left and right edges from being cut ( #6285 )
2019-05-20 17:23:54 +02:00
Akihiko Kusanagi
200672a787
Apply lineJoin style at the first point in radar charts ( #6269 )
2019-05-20 09:28:09 +02:00
Akihiko Kusanagi
9482ee55eb
Fix point label counting in radialLinear scale ( #6280 )
2019-05-16 20:34:43 +02:00
Akihiko Kusanagi
e35b8891ce
Treat 0 as a valid point label for radial scale ( #6279 )
2019-05-16 20:17:46 +02:00
Jukka Kurkela
1686ce0aa7
Apply offset regardless of min/max time scale options ( #6264 )
2019-05-12 16:52:30 +02:00
Ben McCann
707e52a014
Fix determineUnitForFormatting floating point error ( #6259 )
2019-05-10 15:02:30 +02:00
Jukka Kurkela
2a96d83c2c
Implement layers (z-index) for layout items ( #6241 )
2019-05-09 15:54:05 +02:00
Jukka Kurkela
95b9953922
Fix overlapping auto-generated ticks on time scale ( #6115 )
2019-05-09 15:42:00 +02:00
Akihiko Kusanagi
feeda5d034
Make legend appearance consistent with chart elements ( #5621 )
2019-05-09 15:33:19 +02:00
Ben McCann
d6a5ea0d36
Implement per-dataset type (default and per-chart) options ( #5999 )
2019-05-06 22:52:40 +02:00
Jukka Kurkela
58e154c7da
Avoid time related deprecation warnings in tests ( #6246 )
2019-05-06 22:46:22 +02:00
Jukka Kurkela
ddee91eb9f
Fix tooltip title in radar charts ( #6238 )
2019-05-03 15:04:25 +08:00
Akihiko Kusanagi
4f722ab619
Fix arc size calculation when circumference is under 2PI ( #6224 )
2019-05-01 18:05:34 +02:00
Jukka Kurkela
1a2a87be3b
Fix arc border with circumference over 2*PI ( #6215 )
2019-04-30 11:34:10 +02:00
Akihiko Kusanagi
0de9fad2b0
Fix tick label rotation and layout issues ( #5961 )
2019-04-30 08:55:04 +02:00
Akihiko Kusanagi
a2ab311fa5
Use the appropriate time format for auto tick generation ( #6182 )
2019-04-26 09:43:36 +02:00
Jukka Kurkela
4e349a0149
Fill before drawing lines ( #6208 )
2019-04-18 22:52:25 +02:00
Jukka Kurkela
89af7b1383
Fix missing tooltip value in radar charts ( #6209 )
2019-04-18 22:39:52 +02:00
Akihiko Kusanagi
c457b506b8
Normalize angle for index in radialLinear scale ( #6177 )
2019-04-02 10:25:37 +02:00
Akihiko Kusanagi
14007a912d
Fix ticks.minor and ticks.major configuration issues ( #6102 )
2019-04-02 09:45:34 +02:00
Ben McCann
a43e3b0f08
Specify time scale min and max options in standard manner ( #6097 )
2019-04-02 09:43:26 +02:00
Dave Kichler
07fae6159e
Implement legend.align: 'start', 'center', 'end' ( #6141 )
...
New `options.legend.align`config option for controlling alignment of legend blocks in horizontal/vertical legends.
2019-03-23 10:25:17 +01:00
Janelle deMent
b9290a20de
Make line options scriptable ( #6128 )
2019-03-21 09:06:39 +01:00
Akihiko Kusanagi
86ed35446d
Fix hover animations and optimize pivot() ( #6129 )
2019-03-21 09:03:39 +01:00
Ben McCann
4941aa0217
Improvements to helpers.almostWhole ( #6120 )
2019-03-19 11:42:41 +01:00
Jukka Kurkela
75e76cffe5
Make decimalPlaces private and update CDN links ( #6131 )
2019-03-13 10:36:10 +01:00
Roman Borovik
f5ff45693e
Correct typo in a comment in test/index.js ( #6122 )
2019-03-11 09:06:50 +01:00
Simon Brunel
87a74f99a1
Fix missing Chart.Chart (deprecated) alias ( #6112 )
2019-03-06 09:12:29 +01:00
Vincent-Ip
93f4e6e4e8
New weight option for pie and doughnut charts ( #5951 )
...
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.
2019-02-27 23:06:54 +01:00
Jukka Kurkela
0ec3f5569e
Add support for per side border width for rectangle ( #6077 )
2019-02-25 09:03:12 +01:00
Ben McCann
317cae11dc
Ignore invalid log scale min and max ( #6058 )
2019-02-24 10:59:21 +01:00
Jon Rimmer
f3b18373e6
Add onLeave callback to legend ( #6059 )
2019-02-24 10:58:22 +01:00
Ben McCann
f2b099b835
Initialize date adapter with chart options ( #6016 )
2019-02-21 08:11:32 +01:00
Ben McCann
3e18708183
Use datetime
as default time scale tooltip format ( #6019 )
...
Remove the logic that computed an "optimal" tooltip format. Instead, always fallback to the `datetime` adapter format which is more efficient and stable. Additionally, remove the adapter `presets` API, which is not needed anymore.
2019-02-18 19:45:38 +01:00
Jukka Kurkela
5fc934eae1
Fix responsive resize on rtl page ( #6063 )
2019-02-13 17:08:38 +01:00
Evert Timberg
ef507e11bd
Handle inextensible dataset.data
array ( #6060 )
2019-02-11 19:31:26 +01:00
Jukka Kurkela
409fdde3b0
Fix randomly failing tooltip test ( #6061 )
...
Use utility to trigger the event in the center of element rather than x/y -based coordinates (its the edge for rectangles)
2019-02-10 15:12:55 +01:00
Akihiko Kusanagi
8b07cc2f28
Implement scriptable options for points in radar charts ( #6041 )
2019-02-09 23:07:54 +01:00
Evert Timberg
945d91aee2
Provide a rectangle getArea implementation for horizontal bars ( #6027 )
2019-02-04 09:56:38 +01:00
Akihiko Kusanagi
80a159eb9d
Enforce tooltip item label
and value
to be strings ( #6030 )
...
Also update the docs for `xLabel` and `yLabel` to also accept a `number`.
2019-02-01 09:21:53 +01:00
Simon Brunel
0697d0de90
Deprecate configMerge and scaleMerge helpers ( #6022 )
...
These methods shouldn't have been public since they are specific to the chart controller internal logic. Note that this scale custom merging will be removed in v3.
2019-01-29 17:52:21 +01:00
Ben McCann
72b7a613a6
Fix typo in test utils comment ( #6017 )
2019-01-28 19:40:07 +01:00
Jukka Kurkela
7c0ad5a05b
Stop drawing radialLinear scale twice ( #6007 )
2019-01-23 15:45:01 +01:00
Jukka Kurkela
8b110fdc51
Handle any element in triggerMouseEvent in tests ( #5994 )
2019-01-20 08:09:21 +01:00
Jukka Kurkela
d9012d9459
Trigger mouse events at the center of arc ( #5991 )
2019-01-18 07:46:13 -05:00
Jukka Kurkela
7bbf3cab5b
Return correct label for value type axis ( #5920 )
2019-01-17 16:04:08 +01:00
Evert Timberg
a655da076e
Implement scriptable options for points in line charts ( #5973 )
2019-01-15 09:24:12 +01:00
Evert Timberg
f3dd96779a
Implement scriptable options for polar area charts ( #5976 )
2019-01-13 21:17:27 +01:00
Simon Brunel
8a3eb85928
Implement adapter to abstract date/time features ( #5960 )
2019-01-11 08:03:28 +01:00
Jukka Kurkela
20c748f90b
Fix modifying ticks in afterBuildTicks ( #5913 )
2019-01-11 07:29:38 +01:00
Evert Timberg
e1ed26f315
Implement scriptable options for doughnut charts ( #5966 )
2019-01-10 16:00:36 +01:00
Simon Brunel
e03d8d8d7b
Make the main controller importable ( #5969 )
...
Merge `core/core.js` in `core/core.controller.js`, split default options next to their associated code and deprecate `Chart.types` (not sure what it was for).
2019-01-09 14:40:11 +01:00
Nodar Nutsubidze
9ecae7c5fb
Test default tooltip callbacks for scatter charts ( #5967 )
...
This moves the mouse over the drawn point and verifies that there is no title in the tooltip and that the body contains expected content.
2019-01-09 14:37:25 +01:00
Jukka Kurkela
9d7eacd251
Fix generateTicks when working with tiny numbers ( #5948 )
2019-01-09 07:58:13 +01:00
Jukka Kurkela
dd3564aee5
Fix title, body and footer alignment inside tooltip ( #5925 )
2019-01-08 13:37:36 +01:00
Simon Brunel
87e44fa360
Cleanup scales export for better import strategy ( #5953 )
...
Scales now export their class and associated defaults (`_defaults`), the registration being done globally in `src/chart.js`.
2019-01-05 14:37:54 +01:00
Akihiko Kusanagi
26b7375329
Prevent bezier points from being capped when a data point is off the chart ( #5937 )
2019-01-05 12:28:15 +01:00
serhii-yakymuk
c51ac8a64a
Make animation duration consistent across browsers ( #5331 )
2019-01-02 16:13:56 +01:00
Akihiko Kusanagi
39b4d61ac2
Fix time scale ticks.reverse issue ( #5933 )
2019-01-02 16:00:55 +01:00
Jukka Kurkela
918e2c027f
Cast getRightValue to number in the bar controller ( #5947 )
2019-01-02 15:55:27 +01:00
Akihiko Kusanagi
aae05a08da
Improve tick generation for linear scales ( #5938 )
...
* Improve tick generation for linear scales
* Simplify the tick generation code
* Refactor getTickLimit
2019-01-01 08:38:09 -05:00
Jukka Kurkela
4b6e53a617
Properly calculate space needed by tick label on autoSkip ( #5922 )
2018-12-21 07:56:53 +01:00
Jukka Kurkela
d7e8b733e3
Add reverse
support to time scale ( #5927 )
2018-12-20 16:08:13 +01:00
Akihiko Kusanagi
d29ec5a485
Add scale.pointLabels.lineHeight and scale.ticks.lineHeight options ( #5914 )
2018-12-20 09:56:06 +01:00
Jukka Kurkela
c8ce3d2018
Add support for typed arrays ( #5905 )
2018-12-18 14:49:39 +01:00
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
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
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
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
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
Simon Brunel
75aa44eef6
Upgrade dev dependencies to reduce vulnerabilities ( #5840 )
2018-11-18 09:33:34 +01: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
Akihiko Kusanagi
e730f87e15
Fix legend item layout issue ( #5816 )
2018-11-12 08:57:16 +01:00
Akihiko Kusanagi
f74699a591
Fix offsetGridLine behavior with a single data point ( #5609 )
2018-11-02 08:44:10 +01: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
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