Commit Graph

2727 Commits

Author SHA1 Message Date
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
Daniel Correa
1ba06a26fd Add aspectRatio property to responsive doc (#5756) 2018-10-09 18:20:09 +02:00
Miguel Martínez Serrano
9293c30d4f Add scatter link in charts documentation (#5736) 2018-09-21 21:22:31 +02:00
Maxim Atanasov
2f9c663d01 Added Wicked-Charts to the Popular Extensions Page (#5734)
Wicked-Charts is a Java wrapper around Chart.js and allows users to create charts in Java using the Wicket framework. The latest version of Wicked-Charts (3.1.0) supports Chartjs and Wicket 8.
2018-09-21 21:21:34 +02:00
Carl Osterwisch
7a65546629 Fix scale when data is all small numbers (#5723)
* Add test for correct handling of small numbers

* Calculate tick precision for arbitrarily small numbers

* Use scientific notation for very small tick numbers

* Calculate significant digits for exponential tick values
2018-09-16 11:33:48 +02:00
Wei-Wei Wu
bbd589d5ab Add "Accessibility" documentation page (#5719) 2018-09-11 09:12:28 +02:00
Wei-Wei Wu
1aa54b074b Add gulp watch task for docs (#5724)
gulp docs --watch
2018-09-09 20:42:18 +02:00
Colin
3830216420 Event handling to use target instead currentTarget (#5575)
If you attach event handlers to a container rather than directly to the canvas then the currentTarget is the container, event.target is the canvas that triggers the event. It's useful to do this if you have many charts or are creating them dynamically.
2018-08-10 09:32:35 +02:00
Tom Pullen
ab41173d9b Fix adding and removing datasets in bar samples (#5663)
Account for zero indexing of arrays when creating a name for an added dataset and remove the last dataset in the array when removing a dataset rather than removing the first.
2018-08-08 18:52:56 +02:00
Tom Pullen
a9c4e377a7 Add color to financial time series sample (#5661) 2018-08-08 18:44:53 +02:00
Simon Brunel
3010173733 Disable hardware acceleration for unit tests
Explicitly disable hardware acceleration to make image diff more stable when ran on Travis and dev machine.
2018-07-29 22:43:23 +02:00
Simon Brunel
91608398b6 Add "point style" image tests
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.
2018-07-29 22:43:23 +02:00
Sebastiaan Lokhorst
9a295816b3 Replace ES6 by Webpack in the integration docs (#5555) 2018-07-29 22:16:10 +02:00
Colin
352268616b Fix min and max option checks in linear scales (#5209)
When 0, the min and max options was considered not being set, instead we should check for null or undefined.
2018-07-29 18:09:16 +02:00
Akihiko Kusanagi
493eaa8424 Refactor helpers.canvas.drawPoint() (#5623)
Bring ctx.beginPath() before switch and replace ctx.fillRect()/ctx.strokeRect() with ctx.rect()/ctx.fill() to make it consistent with the other styles. It is also preferable that helpers.canvas.roundedRect() include ctx.closePath() at the end because CanvasRenderingContext2D.rect() closes the subpath.

Get rid of ctx.closePath() for cross, crossRot, star, line and dash because these have no closed path shape, and it should be avoided that ctx.closePath() makes a round-trip path.
2018-07-29 11:31:28 +02:00
Jung Oh
0963c8f76c Fix positioning in the custom tooltip example (#5454) 2018-07-14 10:06:02 +02:00
Akihiko Kusanagi
119a86f399 Update the descriptions of barThickness, offsetGridLines and offset (#5600) 2018-07-14 09:57:16 +02:00
Niel Mistry
246b9a1a40 Add circular option documentation for grid lines (#5637) 2018-07-14 09:52:49 +02:00
Akihiko Kusanagi
9c3b0d2e29 Add a link to chartjs-plugin-style to extensions.md (#5638) 2018-07-14 09:51:50 +02:00
Akihiko Kusanagi
48fefd92b6 Fix the example of Linear Radial Axis (#5633) 2018-07-11 18:59:16 -04:00
Bart Deslagmulder
858d86eebb Add label for first dataset in progress-bar example (#5625)
While the second dataset already has a label ("My Second dataset") the first dataset showed "undefined" as a label. Added a label to the first dataset object.
2018-07-09 20:27:43 +02:00
Joel Hamilton
0ddd0ee16b Enable arbitrary rotation of datapoints (#5319) 2018-07-07 17:54:05 +02:00
Réda Housni Alaoui
387a23df73 Add support for Shadow DOM (#5585)
https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/host
2018-07-07 17:52:29 +02:00
Alec Fenichel
1cd0469bdc Add 15 minutes time steps (#5613) 2018-07-07 17:51:02 +02:00
Simon Brunel
88308c600c
Enhance the rounded rectangle implementation (#5597)
Use `arcTo` instead of `quadraticCurveTo` (both methods have the same compatibility level) because it generates better results when the final rect is a circle but also when it's actually a rectangle and not a square. This change is needed by the datalabels plugin where the user can configure the `borderRadius` and thus generate circle from a rounded rectangle.
2018-06-26 17:58:32 +02:00
Daniel Ruf
6f90e0799e Use comment for pull request template (#5595) 2018-06-26 09:47:12 +02:00
Ben McCann
da3aa68f38 Restore original styles when removing hover (#5570)
Refactor `updateElement` and `removeHoverStyle` and fix tests.
2018-06-26 08:56:53 +02:00
Akihiko Kusanagi
7cf132316a Call update() and render() with a config object (#5592) 2018-06-24 14:31:51 -04:00
Shayne Linhart
a0a195f353 Added 'angle' option to Polar Charts (#5279)
* 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"
2018-06-17 11:56:57 -04:00
Ben McCann
f5140d243b Direct questions and support to StackOverflow (#5571) 2018-06-16 18:54:47 +02:00
Matt Haff
8198d760bb Handle '\n' as new line in tooltips (#5521) 2018-06-05 09:14:37 +02:00
Guiomar Valderrama
8a7278052f clarify moment.js included in bundle cannot be used outside of chartjs (#5528) 2018-06-04 08:14:04 -04:00
Antoine Aumjaud
ca9d3175c5 Fix time documentation (#5507) 2018-05-26 09:55:44 +02:00