Commit Graph

2652 Commits

Author SHA1 Message Date
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
jcopperfield
25b7f41bac Bug: Avoid updating Chart when responsive: true and Chart is hidden. (#5172)
* Bug: Avoid updating Chart when `responsive: true` and Chart is hidden.

* Prevent `drawing` when width/height is invalid.
2018-05-22 21:11:28 -04:00
Marc Poulhiès
1072ed9238 Fix typo in README.md (#5504) 2018-05-22 22:23:24 +02:00
Krystian Sokołowski
14399ffe37 Update gulpfile.js to use in strict mode (#5478) 2018-05-09 09:15:04 +02:00
andi-b
73b8ceeb35 Fix responsive in IE11 with padding as percentage (#4620)
When the chart is responsive to the parent container, the calculations for padding assumes that the figure is in pixels so that 20% is taken to be 20 (pixels), which results in the chart exceeding the parent container. This appears to be an IE11 only issue.
2018-04-22 20:32:42 +02:00
Evert Timberg
85169c5603
Proper tick position for right positioned axis (#5401)
* Proper tick position for right positioned axis
* Test for tick mark drawing
2018-04-11 18:16:32 -04:00
veggiesaurus
a468ca17b0 Skip point outside the clipping area (#5363) 2018-04-06 09:29:33 +02:00
serhii-yakymuk
7c3e934062 Fix line clipping at the chart area borders (#5321) 2018-04-03 09:23:16 +02:00
Simon Brunel
bee8e3cd9b Make Chart.Scale/scaleService importable (#5383) 2018-04-02 17:43:28 -04:00
Simon Brunel
d284686452
Make Chart.Animation/animations/Tooltip importable (#5382) 2018-04-02 10:55:52 +02:00
Evert Timberg
9fbac88938 Add ticks.precision option to linear scale. (#4841)
If defined and `stepSize` is not specified, the step size will be rounded to this many decimal places.
2018-04-01 18:56:45 +02:00
Juan Eugenio Abadie
a191921b15 Fix typo in the legend documentation (#5348) 2018-03-20 15:37:56 +01:00
Evert Timberg
25f26346d5
Time Point Data sample works correctly (#5328) 2018-03-13 18:52:19 -04:00
Sean Sobey
7f4b1d9715 Add undefined guard for window.devicePixelRatio (#5324) 2018-03-10 16:57:27 +01:00
Pierre GIRAUD
d0b26dbddd Show how to use circumference and rotation options (#5326) 2018-03-10 16:56:27 +01:00
Akihiko Kusanagi
b7025fedbe Add a link to chartjs-plugin-streaming to extensions.md (#5309) 2018-03-02 20:13:41 -05:00
Simon Brunel
ac088a04ab Bump version to 2.7.2 (#5307) 2018-03-01 16:20:53 -05:00
jcopperfield
c2a5b12376 Bugfix: Improve polyfill function of log10 to return whole powers of 10 (#5275)
* Bugfix: Improve polyfill function of log10 to return whole powers of 10
        as integer values, as it caused endless loop in IE11 in the tick
        creation loop.

* Compare floating-point numbers directly instead of using unnecessary division.
2018-02-20 18:44:01 -05:00
Wilson Lin
c90cf2ebcd Make both README.md and installation.md clearer (#5274)
Address the ambiguity of "Selecting the Correct Build" section
2018-02-20 13:29:10 +01:00
Winter Zhong
be6660c63d Improve title of generated documentation (#5256) 2018-02-15 19:25:49 -05:00
Laura Cressman
d6ce5c0772 Support multiple font colors for radial chart labels (#5240)
* Support multiple font colors in array

* Address linting error
2018-02-14 21:22:19 -05:00
Michael
584d1c646c Fix label vertical alignment on vertical scales (#5248) 2018-02-09 23:20:06 +01:00
Ben McCann
bba29e5916 Remove trailing spaces from docs (#5227) 2018-02-04 12:27:50 +01:00
Loïc Bourgois
182270ef9b Setup HTML and JS linters for samples (#5195) 2018-02-03 13:28:54 +01:00
stockiNail
97ff45873e Add Charba GWT integration to extensions.md (#5225) 2018-02-02 10:17:24 +01:00
Simon Brunel
c268185953 Fix Slack invitation link (#5217)
Setup a new Heroku app based on rauchg/slackin, using Slack legacy token from the Chart.js (chartjs.slack@...) user and reCAPTCHA from the same Google account.
2018-01-31 19:35:08 -07:00