Commit Graph

2484 Commits

Author SHA1 Message Date
Simon Brunel
fcd463354b
Update license year and copyright holders (#5053) 2017-12-31 15:17:22 +01:00
Cameron Childress
9874a754e0 Adding helpful note about legendCallback (#5094)
I didn't realize you had to call generateLegend() manually and a quick search tells me that lots of other people have run into this too.
2017-12-29 08:52:17 +01:00
jcopperfield
92d033beb2 Optimization: prevent double ticks array reverse for vertical logarithmic axis (#5076)
with ticks option 'reverse: true'.
2017-12-23 08:34:55 -05:00
Boyi C
ce1fc28b74 Improve point.xRange and point.yRange performance (#5062) 2017-12-18 20:24:02 +01:00
jcopperfield
b04ce949d1 Use time.unit option to create default min/max for empty chart (#5045) 2017-12-15 18:10:30 +01:00
jcopperfield
f9beedba40 Fix issue #5029 (#5041)
- infinite loop in generating time axis, due to insufficient bounds checking.
2017-12-14 10:03:07 -05:00
jcopperfield
f0bf3954fe Fix issues #4572 and #4703 (#4959)
- issue #4572: logarithmic type if all numbers are zero browser crashes "Out of memory"
 - issue #4703: [BUG] Browser unresponsive on bubble chart with logarithmic axes
2017-12-12 18:43:51 -05:00
jcopperfield
4e47c178e4 Fix tooltip animation when target changes while animating (#5005)
* Fix issue #4989
 - tooltip in 'index' mode doesn't animate smoothly.

* Change: different approach for smooth tooltip animation in 'index'
        mode, when target doesn't change.

* Fix: jslint error

* Fix: remove spyOn pivot from test

* Add: setAnimating-flag in transition used to set on tooltip.transition
     to keep track of tooltip animation.

* Decrease code complexity

* Revert transition and complexity changes
Add: use 'tooltip._start' as workaround check for tooltip animation status
2017-12-12 18:43:17 -05:00
jcopperfield
6f34b2224f Fix issue #4928: linear tick generator doesn't round values to needed precision. (#4943)
* Fix issue 4928
 - linear tick generator doesn't round values to needed precision.

* Improve: replace toPrecision() in toString() to improve readability.

* Fix: logarithmic tick generator doesn't round values to needed precision.

* Fix: rounding tick values didn't work for negative values.

* Add: Core ticks tests
2017-12-02 09:24:57 -05:00
Simon Brunel
15d1056b53
Implement equally sized bars (#4994)
When `barThickness: undefined|null` (default), we compute an optimal sample size based on the smallest tick interval reduced to prevent any bar to overlap (bar equally sized). Also added support for a special `barThickness: 'flex'` value (previous default) that globally arranges bars side by side to prevent any gap when percentage options are 1 (variable bar sizes).
2017-12-02 12:38:36 +01:00
JohnShaft
b835df02cd Add Angular2+ libraries for Chart.js in docs (#5006) 2017-12-01 18:56:49 +01:00
beiz23
9a7182ba36 Fix typos and broken links in the docs (#5010) 2017-11-30 14:41:32 +01:00
Xingan Wang
333f2eba99 Fix scale options update (#4198)
- allow options to be updated in-place or as a new object
- re-merge new options and rebuild scales & tooltips
- preserve reference to old scale if id/type not changed
- related tests and new sample also added.
- update document about options update
- update doc and example
2017-11-29 22:52:23 +01:00
jcopperfield
42d3d91f52 Fix issue #4441 - y-axis labels partially hidden due to restrictive initial fitting. (#4942)
* Fix issue 4441:
 - y-axis labels partially hidden due to restrictive initial fitting.

* Add regression test to linear scale

* Moved regression test from linear scale to core layout service
2017-11-25 08:28:57 -05:00
Jean-Philippe Sirois
e2dd4483c7 Add an Ember.js Integration in the Documentation (#4984) 2017-11-24 19:31:58 -05:00
Evert Timberg
8ce7a9146b
Fix line to time axis documentation in bar chart docs (#4979) 2017-11-22 18:07:36 -05:00
anders
6b824d9334 add check on overwriting canvas height/width (#4874)
* add check on overwriting canvas height/width

* unit test for this
2017-11-21 19:04:26 -05:00
jcopperfield
e080e782ab Fix bumpy line on smooth data set (#4944)
Linear scale getPixelForValue() method doesn't round the returned value anymore.
2017-11-14 13:56:45 +01:00
jcopperfield
447ca40a7f Correctly handle stacked groups when not adjacent (#4937)
Only the dataset index was used for indexing the stack
2017-11-14 10:33:36 +01:00
Kaido Hallik
683e86e549 Avoid tooltip truncation in x axis if there is enough space (#3998)
* In tooltip x align calculation take into account caretSize

Truncation up to caretSize pixels could happen if label text produced tooltip element with size width:
* left side tooltip: width < x and width > x - caretSize
* right side tooltip: width < chartWidth - x and width > chartWidth - x - caretSize
Default caretSize = 5, so with default configuration truncation up to 5 pixels could happen.

* avoid tooltip truncation if possible
use whole chart area for displaying tooltip

* in xAlign calculation take into account caretPadding

* add tests for tooltip truncation avoid logic

* use caretX instead of xCaret

* fix lint errors
2017-11-11 18:02:05 -05:00
jcopperfield
939756c260 Fix log scale when value is 0 (#4913) 2017-11-10 09:16:48 +01:00
Ben McCann
d415e617d8 Reset only when animating (#4923) 2017-11-07 18:26:37 -05:00
Martin Alex Philip Dawson
52790f6f23 Update extensions.md (#4930)
Removed trailing space from waterfall-plugin.
2017-11-07 18:25:11 -05:00
Jonathan Grimes
67479c22f9 Relax dependencies semver range (#4891)
Prevent duplicate version of moment.js (which is pretty large) when an app also depends on moment (with less strict semver range)
2017-11-07 19:12:33 +01:00
Martin Alex Philip Dawson
95d7d8c20d Add link to chartjs-plugin-waterfall (#4921) 2017-11-06 10:39:39 +01:00
Aspaldiko
34709826cd Fix incorrect samples titles (#4914) 2017-11-02 13:51:36 +01:00
andig
7f751c8d80 Suppress coveralls errors if run from fork (#4699) 2017-11-01 16:00:41 +01:00
Ben McCann
ffbdb48310 Upgrade dependencies (incl. ESLint 4) (#4738) 2017-11-01 16:00:10 +01:00
Ben McCann
8a6d58d2d9 Bump version to 2.7.1 (#4877) 2017-10-28 10:22:20 +02:00
Evert Timberg
13e9676625 Reset tooltip when calling Chart.update (#4840) 2017-10-28 10:20:34 +02:00
Simon Brunel
26c1936dee Move extend and inherits helpers in helpers.core.js (#4878)
Fix Rollup issue caused by early access of the `extend` and `inherits` helpers not yet part of the `helpers/index` import. Also added (basic) unit tests for whose methods.
2017-10-24 19:11:40 +02:00
Simon Brunel
c81a55fed1 Add jsDelivr as CDN install option (#4881) 2017-10-22 13:18:24 -04:00
Ben McCann
9f32f0775a Attempt to fix test flakiness (Firefox) (#4880)
These settings deal with browser disconnects. We had seen test flakiness from Firefox:
[Firefox 56.0.0 (Linux 0.0.0)]: Disconnected (1 times), because no message in 10000 ms
2017-10-22 17:32:39 +02:00
Evert Timberg
ee6432b4cb Update supported browser section (#4818) 2017-10-21 08:43:31 -04:00
Ben McCann
b64fd5db25 Respect min and max when building ticks (#4860)
Generate time scale ticks (`ticks.source: 'auto'`) based on the effective visualized range instead of the actual data range, meaning that the computed units and/or step size may change if the time options min and max are different from the data min and max.
2017-10-20 09:03:38 +02:00
minusf
11315fba2b minor doc fixes (#4851) 2017-10-16 18:45:54 -04:00
JewelsJLF
8ac0257f8d Add "beforeTooltipDraw" and "afterTooltipDraw" plugin hooks (#4793) 2017-10-14 23:29:35 +02:00
Florian Scholz
c83b03f668 Fixes #4772: added scope for tooltip position mode call and added docs (#4784)
* added scope for tooltip position mode call and added docs

* added test for positioner

* removed named func for lint

* resolved pull-request comments
2017-10-10 18:33:25 -04:00
Ben McCann
d81afc8b5a Fix choosing of formatting unit (#4779)
* Don't change minorFormat when determining label capacity

* Fix choosing of formatting unit
2017-10-09 09:54:27 -04:00
Ben McCann
d2226b2892 Fix markdown (#4827) 2017-10-08 08:09:39 -04:00
Ben McCann
fa2ca2c1e2 Clarify that x/y coordinates only work with the time scale (#4826) 2017-10-07 22:18:50 -04:00
Simon Brunel
3fe198c860 Fix responsive issue when the chart is recreated (#4774)
Chrome specific issue that happens when destroying a chart and re-creating it immediately (same animation frame?). The CSS animation used to detect when the canvas become visible is not re-evaluated, breaking responsiveness. Accessing the `offsetParent` property will force a reflow and re-evaluate the CSS animation.
2017-10-07 17:43:09 +02:00
Fabio Poloni
73a3c3b821 fixed typo (#4819) 2017-10-06 07:36:39 -04:00
Rittyan
0bd0654efb fix colour settings of BeforeLabel and BeforeBody (#4783)
* fix colour settings of BeforeLabel and BeforeBody

* delete redundant variable declaration

* collect label colour setting.
2017-10-03 00:33:03 +02:00
Ben McCann
b4d69247b0 Fix handling of null labels (#4795) 2017-09-29 13:52:33 +02:00
Rydori
b94532c29f Error if style is null (#4781)
I tested in Chrome and when style(line 50) is null, style.toString is undefined
Reason: typeof null equals "object" (at least in Chrome)
2017-09-29 13:30:41 +02:00
Ben McCann
8a4ac1e12e Rename INTERVALS.major to INTERVALS.common (#4777) 2017-09-29 13:06:09 +02:00
Evert Timberg
52145de5db Fix regression in x-axis interaction mode (#4762) 2017-09-16 08:01:26 -04:00
Ben McCann
2b89f7a989 Consistent formatting for cartesian option docs (#4765) 2017-09-15 19:53:51 -04:00
Ben McCann
4396a53041 Expand scale jsdocs (#4736) 2017-09-11 16:33:20 -04:00