Commit Graph

2829 Commits

Author SHA1 Message Date
Jon Rimmer
b36d55d093 Add onLeave to legend config docs (#6088) 2019-02-25 08:59:48 +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
Akihiko Kusanagi
20c26455ba Add a link to chartjs-plugin-rough to extensions.md (#6081) 2019-02-20 16:13:41 +01:00
Ben McCann
1c01272c9a Improve autoSkip documentation (#6079) 2019-02-20 09:28:07 +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
Abel Heinsbroek
32aeeac82c Add crosshair plugin to extensions page (#6070) 2019-02-18 10:09:37 +01:00
Janelle deMent
58d7891ba2 Add examples of scriptable charts (#6042)
* Add example of scriptable pie chart
* Add example of scriptable line chart
* Add example of scriptable polar area chart
* Add example of  scriptable radar chart
2019-02-13 21:12:52 -05: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
Ben McCann
2f874fde62 Use lowercase for primitives in jsdocs (#6033) 2019-02-11 08:51:39 +01:00
Alfie Hopkin
af464f8a85 Enhance legend label color point when usePointStyle is true (#6006) 2019-02-10 19:04:29 +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
James Bedford
0ed652b39f Fix typo in radial linear scale docs (#6054) 2019-02-09 08:19:57 +01:00
Simon Brunel
55128f74c1 Move CSS in a separate file to be CSP-compliant (#6048)
In order to be compatible with any CSP, we need to prevent the automatic creation of the DOM 'style' element and offer our CSS as a separate file that can be manually loaded (`Chart.js` or `Chart.min.js`). Users can now opt-out the style injection using `Chart.platform.disableCSSInjection = true` (note that the style sheet is now injected on the first chart creation).

To prevent duplicating and maintaining the same CSS code at different places, move all these rules in `platform.dom.css` and write a minimal rollup plugin to inject that style as string in `platform.dom.js`. Additionally, this plugin extract the imported style in `./dist/Chart.js` and `./dist/Chart.min.js`.
2019-02-08 19:06:04 +01:00
Ben McCann
c6c4db7906 Simplify and cleanup the scale _autoskip method (#6043) 2019-02-08 07:10:02 +01:00
Janelle deMent
7c11c81d96 Fix broken markdown link in 'line' docs (#6053) 2019-02-08 07:06:17 +01:00
Jukka Kurkela
cbb7ff7754 Rename addEventListener and removeEventListener (#6046)
Prevent conflict with `window.addEventListener` and `window.removeEventListener` (global scope).
2019-02-06 08:26:53 +01:00
Ben McCann
765c432dfa Fix duplicate anchor (#6038)
* Fix broken documentation anchors

* Revert changes to installation docs
2019-02-04 20:00:44 -05:00
Evert Timberg
945d91aee2 Provide a rectangle getArea implementation for horizontal bars (#6027) 2019-02-04 09:56:38 +01:00
Ben McCann
93d5ac9a31 Remove unused eslint directive (#6040) 2019-02-04 08:19:40 +01:00
Jukka Kurkela
6e9e52afac Fix padding of horizontal axes when labels are rotated (#6021) 2019-02-02 09:46:27 +01:00
Ben McCann
a2521e54ee Replace deprecated gulp-util and remove unused watchify (#6032)
* Replace deprecated gulp-util and remove unused watchify

* Remove logging
2019-02-01 20:03:31 -05: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
Jukka Kurkela
97da221f27 Prevent infinite resize when vertical scrollbar appears (#6011)
If the container size shrank during chart resize, let's assume scrollbar appeared. So we resize again with the scrollbar visible effectively making chart smaller and the scrollbar hidden again. Because we are inside `throttled`, and currently `ticking`, scroll events are ignored during this whole 2 resize process. If we assumed wrong and something else happened, we are resizing twice in a frame (potential performance issue)
2019-01-30 11:48:56 +01:00
Jukka Kurkela
29f7fa23bb Replace tooltip item xLabel and yLabel with label and value (#5996) 2019-01-30 11:41:19 +01:00
Janelle deMent
fee44cfeef Omit inconsistent note about scriptable options (#6026) 2019-01-30 09:24:26 +01:00
Simon Brunel
e07c5d0c6c
Make moment optional from our UMD builds (#5978) 2019-01-29 17:54:22 +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
17f6fd2340 Common logic for resolving line element options (#6005) 2019-01-29 14:45:56 +01:00
Akihiko Kusanagi
0d01bcf5cc Fix typos and make the docs consistent (#6020) 2019-01-29 13:34:16 +01:00
Ben McCann
72b7a613a6 Fix typo in test utils comment (#6017) 2019-01-28 19:40:07 +01:00
Jukka Kurkela
e6a0c86909 Fix pointBackgroundColor in radar sample (#6013) 2019-01-25 11:48:01 +01:00
Jukka Kurkela
05e9627510 Supply correct start param for insertElements in onDataPush (#6008) 2019-01-25 10:27:22 +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
Ben McCann
69b4a4c003 Faster date operations (#5982) 2019-01-17 16:01:27 +01:00
Ben McCann
740e0874a4 Update contributors guide and issue templates (#5962) 2019-01-16 09:35:14 +01:00
Evert Timberg
a655da076e Implement scriptable options for points in line charts (#5973) 2019-01-15 09:24:12 +01:00
Janelle deMent
352e53a0b6 Update the responsive docs about resizing the parent node (#5974)
Add a note about resizing the chart height with maintainAspectRatio
2019-01-13 21:20:25 +01:00
Evert Timberg
f3dd96779a Implement scriptable options for polar area charts (#5976) 2019-01-13 21:17:27 +01:00
Akihiko Kusanagi
9d1d2023d4 Fix labelOffset description (#5979) 2019-01-11 19:29:39 -05:00
Simon Brunel
8a3eb85928
Implement adapter to abstract date/time features (#5960) 2019-01-11 08:03:28 +01:00
Ben McCann
b50a1c21f2 Fix typo / grammar in the responsive docs (#5975) 2019-01-11 07:31:36 +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