]> git.ipfire.org Git - thirdparty/Chart.js.git/log
thirdparty/Chart.js.git
7 years agoBump version to 2.7.1 (#4877) 4876/head 4906/head
Ben McCann [Sat, 28 Oct 2017 08:22:20 +0000 (01:22 -0700)] 
Bump version to 2.7.1 (#4877)

7 years agoReset tooltip when calling Chart.update (#4840)
Evert Timberg [Sat, 28 Oct 2017 08:20:34 +0000 (04:20 -0400)] 
Reset tooltip when calling Chart.update (#4840)

7 years agoMove extend and inherits helpers in helpers.core.js (#4878)
Simon Brunel [Tue, 24 Oct 2017 17:11:40 +0000 (19:11 +0200)] 
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.

7 years agoAdd jsDelivr as CDN install option (#4881)
Simon Brunel [Sun, 22 Oct 2017 17:18:24 +0000 (19:18 +0200)] 
Add jsDelivr as CDN install option (#4881)

7 years agoAttempt to fix test flakiness (Firefox) (#4880)
Ben McCann [Sun, 22 Oct 2017 15:32:39 +0000 (08:32 -0700)] 
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

7 years agoUpdate supported browser section (#4818)
Evert Timberg [Sat, 21 Oct 2017 12:43:31 +0000 (08:43 -0400)] 
Update supported browser section (#4818)

7 years agoRespect min and max when building ticks (#4860)
Ben McCann [Fri, 20 Oct 2017 07:03:38 +0000 (00:03 -0700)] 
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.

7 years agominor doc fixes (#4851)
minusf [Mon, 16 Oct 2017 22:45:54 +0000 (00:45 +0200)] 
minor doc fixes (#4851)

7 years agoAdd "beforeTooltipDraw" and "afterTooltipDraw" plugin hooks (#4793)
JewelsJLF [Sat, 14 Oct 2017 21:29:35 +0000 (15:29 -0600)] 
Add "beforeTooltipDraw" and "afterTooltipDraw" plugin hooks (#4793)

7 years agoFixes #4772: added scope for tooltip position mode call and added docs (#4784)
Florian Scholz [Tue, 10 Oct 2017 22:33:25 +0000 (00:33 +0200)] 
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

7 years agoFix choosing of formatting unit (#4779)
Ben McCann [Mon, 9 Oct 2017 13:54:27 +0000 (06:54 -0700)] 
Fix choosing of formatting unit (#4779)

* Don't change minorFormat when determining label capacity

* Fix choosing of formatting unit

7 years agoFix markdown (#4827)
Ben McCann [Sun, 8 Oct 2017 12:09:39 +0000 (05:09 -0700)] 
Fix markdown (#4827)

7 years agoClarify that x/y coordinates only work with the time scale (#4826)
Ben McCann [Sun, 8 Oct 2017 02:18:50 +0000 (19:18 -0700)] 
Clarify that x/y coordinates only work with the time scale (#4826)

7 years agoFix responsive issue when the chart is recreated (#4774)
Simon Brunel [Sat, 7 Oct 2017 15:43:09 +0000 (17:43 +0200)] 
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.

7 years agofixed typo (#4819)
Fabio Poloni [Fri, 6 Oct 2017 11:36:39 +0000 (13:36 +0200)] 
fixed typo (#4819)

7 years agofix colour settings of BeforeLabel and BeforeBody (#4783)
Rittyan [Mon, 2 Oct 2017 22:33:03 +0000 (07:33 +0900)] 
fix colour settings of BeforeLabel and BeforeBody (#4783)

* fix colour settings of BeforeLabel and BeforeBody

* delete redundant variable declaration

* collect label colour setting.

7 years agoFix handling of null labels (#4795)
Ben McCann [Fri, 29 Sep 2017 11:52:33 +0000 (04:52 -0700)] 
Fix handling of null labels (#4795)

7 years agoError if style is null (#4781)
Rydori [Fri, 29 Sep 2017 11:30:41 +0000 (13:30 +0200)] 
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)

7 years agoRename INTERVALS.major to INTERVALS.common (#4777)
Ben McCann [Fri, 29 Sep 2017 11:06:09 +0000 (04:06 -0700)] 
Rename INTERVALS.major to INTERVALS.common (#4777)

7 years agoFix regression in x-axis interaction mode (#4762)
Evert Timberg [Sat, 16 Sep 2017 12:01:26 +0000 (08:01 -0400)] 
Fix regression in x-axis interaction mode (#4762)

7 years agoConsistent formatting for cartesian option docs (#4765)
Ben McCann [Fri, 15 Sep 2017 23:53:51 +0000 (16:53 -0700)] 
Consistent formatting for cartesian option docs (#4765)

7 years agoExpand scale jsdocs (#4736)
Ben McCann [Mon, 11 Sep 2017 20:33:20 +0000 (13:33 -0700)] 
Expand scale jsdocs (#4736)

7 years agoImplement scale label padding (#4646) 4706/head
andig [Sun, 10 Sep 2017 17:15:47 +0000 (19:15 +0200)] 
Implement scale label padding (#4646)

7 years agoAdd Google Analytics to samples and update badges (#4734)
Simon Brunel [Sun, 10 Sep 2017 12:31:59 +0000 (14:31 +0200)] 
Add Google Analytics to samples and update badges (#4734)

Inject the GA tracking snippet for all samples, including the index page. Also update README.md badges using the shields.io service for consistency with flat-square style and cache, and add release badges to the installation documentation page.

7 years agoAdd a financial time series sample (#4554)
Ben McCann [Sun, 10 Sep 2017 08:54:12 +0000 (01:54 -0700)] 
Add a financial time series sample (#4554)

7 years agoUpdate chartjs-color dependency (#4733)
Simon Brunel [Sat, 9 Sep 2017 22:27:39 +0000 (00:27 +0200)] 
Update chartjs-color dependency (#4733)

Enforce dependencies minor versions (tilde symbol: include everything greater than a particular version in the same minor range).

7 years agoMake major ticks optional and off by default (#4723)
Ben McCann [Fri, 8 Sep 2017 22:25:51 +0000 (15:25 -0700)] 
Make major ticks optional and off by default (#4723)

7 years agoAdd platform basic implementation (fallback) (#4708)
Simon Brunel [Sat, 2 Sep 2017 09:04:10 +0000 (11:04 +0200)] 
Add platform basic implementation (fallback) (#4708)

If `window` or `document` are `undefined`, a minimal platform implementation is used instead, which one only returns a context2d read from the given canvas/context.

8 years agoBump version to 2.7.0
Simon Brunel [Mon, 28 Aug 2017 08:33:42 +0000 (10:33 +0200)] 
Bump version to 2.7.0

8 years agoImprove controller tests stability (#4698)
andig [Sun, 27 Aug 2017 20:43:16 +0000 (22:43 +0200)] 
Improve controller tests stability (#4698)

8 years agoRemove trailing `.js` in plugin names (docs)
Simon Brunel [Sat, 26 Aug 2017 06:01:33 +0000 (08:01 +0200)] 
Remove trailing `.js` in plugin names (docs)

8 years agoFix bar chart with {x, y} data points (#4673)
Akihiko Kusanagi [Sat, 26 Aug 2017 05:50:39 +0000 (14:50 +0900)] 
Fix bar chart with {x, y} data points (#4673)

8 years agoFix wild special zero grid line when undefined (#4700)
Simon Brunel [Sat, 26 Aug 2017 05:48:57 +0000 (07:48 +0200)] 
Fix wild special zero grid line when undefined (#4700)

Remove the special drawing for an undefined zero grid line since it causes issue when the first tick is not aligned on the scale extremity (ie only linear scales now display a special grid line for the origin). Hide scales in the filler plugin unit test fixtures to avoid future failures due to changes unrelated to the tested features.

8 years agoFix flipped stepped line in filler plugin (#4697)
Akihiko Kusanagi [Fri, 25 Aug 2017 22:42:52 +0000 (07:42 +0900)] 
Fix flipped stepped line in filler plugin (#4697)

8 years agoAdd chartjs-plugin-datalabels plugin link (#4701)
Simon Brunel [Fri, 25 Aug 2017 22:34:37 +0000 (00:34 +0200)] 
Add chartjs-plugin-datalabels plugin link (#4701)

8 years agoImprove bar test stability (#4694)
andig [Thu, 24 Aug 2017 22:16:08 +0000 (00:16 +0200)] 
Improve bar test stability (#4694)

8 years agoFix scriptable options documentation snippet
Simon Brunel [Thu, 24 Aug 2017 08:31:17 +0000 (10:31 +0200)] 
Fix scriptable options documentation snippet

8 years agoIntroduce scriptable options (bubble chart) (#4671)
Simon Brunel [Thu, 24 Aug 2017 07:34:38 +0000 (09:34 +0200)] 
Introduce scriptable options (bubble chart) (#4671)

New `options.resolve` helper that determines the final value to use from an array of input values (fallback) and a given context and/or index. For now, only the bubble chart support scriptable options, see documentation for details.

Add scriptable options documentation and update the bubble chart dataset properties table with their scriptable and indexable capabilities and default values. Also move point style description under the element configuration section.

8 years agoMake bar tests independent from scales (#4686)
andig [Wed, 23 Aug 2017 21:07:14 +0000 (23:07 +0200)] 
Make bar tests independent from scales (#4686)

8 years agoWhen a radial scale is rotated using the startAngle option, the tick labels did not...
Evert Timberg [Mon, 21 Aug 2017 22:17:49 +0000 (18:17 -0400)] 
When a radial scale is rotated using the startAngle option, the tick labels did not appear in the correct places. (#4682)

8 years agoFix autoskipped ticks messing up category axis (#4649)
andig [Sat, 19 Aug 2017 13:03:11 +0000 (15:03 +0200)] 
Fix autoskipped ticks messing up category axis (#4649)

8 years agoremove redundant tooltip initialize (#4655)
Xingan Wang [Mon, 14 Aug 2017 11:37:17 +0000 (04:37 -0700)] 
remove redundant tooltip initialize (#4655)

8 years agoMake `offsetGridLines` consistent and add new `offset` scale option (#4545)
Akihiko Kusanagi [Mon, 14 Aug 2017 08:09:33 +0000 (16:09 +0800)] 
Make `offsetGridLines` consistent and add new `offset` scale option (#4545)

Add a new `offset` option to scales to add extra space at edges and remove the `includeOffset` argument from `getPixelForValue()` and `getPixelForTick()`. The bar controller now automatically calculates the bar width to avoid overlaps. When `offsetGridLines` is true, grid lines move to the left by one half of the tick interval, and labels don't move.

8 years agoUpdate codeclimate.yml (#4654)
Zach Panzarino [Mon, 14 Aug 2017 02:42:34 +0000 (22:42 -0400)] 
Update codeclimate.yml (#4654)

* Update codeclimate.yml

* Update .codeclimate.yml

8 years agoTicks callback is now called with `this` as scope (#4632)
andig [Sun, 13 Aug 2017 09:44:06 +0000 (11:44 +0200)] 
Ticks callback is now called with `this` as scope (#4632)

8 years agoDocument new time options (#4592)
Ben McCann [Tue, 8 Aug 2017 21:39:19 +0000 (14:39 -0700)] 
Document new time options (#4592)

8 years agoRefactor autoskip functionality into a separate method (#4614)
Ben McCann [Mon, 7 Aug 2017 18:24:59 +0000 (11:24 -0700)] 
Refactor autoskip functionality into a separate method (#4614)

8 years agoFix tests on OSX with retina screen 4619/head
andig [Sat, 5 Aug 2017 14:48:12 +0000 (16:48 +0200)] 
Fix tests on OSX with retina screen

* Fix retina unit test failures
* Honor config file formatting
* Prevent gulp error on non-zero karma result

8 years agoEnforce variable declaration coding style (#4610)
Simon Brunel [Thu, 3 Aug 2017 16:33:18 +0000 (18:33 +0200)] 
Enforce variable declaration coding style (#4610)

For consistency, enable ESLint `one-var` rule to require multiple variable declarations for initialized variables per scope. Uninitialized variables can still be declared together (preferred) or separately.

http://eslint.org/docs/rules/one-var

8 years agoMake Chart.Ticks private and remove Chart.Ticks.generators.time (#4602)
Ben McCann [Wed, 2 Aug 2017 12:30:38 +0000 (05:30 -0700)] 
Make Chart.Ticks private and remove Chart.Ticks.generators.time (#4602)

8 years agoAllow updating dataset types (#4586)
Ben McCann [Wed, 2 Aug 2017 05:29:34 +0000 (22:29 -0700)] 
Allow updating dataset types (#4586)

8 years agoChange `scale.ticks.bounds` to `scale.bounds` (#4595)
Simon Brunel [Wed, 2 Aug 2017 05:28:27 +0000 (07:28 +0200)] 
Change `scale.ticks.bounds` to `scale.bounds` (#4595)

The `bounds` option makes more sense directly under `scale` since it defines the scale limits strategy when no explicit min/max are specified. Also change the `bounds: 'labels'` option value for `bounds: 'ticks'` because it really means: "ensure ticks to be fully visible in the scale, whatever the ticks `source`.

8 years agoReplace the IFRAME resizer by DIVs (#4596)
Simon Brunel [Wed, 2 Aug 2017 05:25:55 +0000 (07:25 +0200)] 
Replace the IFRAME resizer by DIVs (#4596)

Resize detection is now based on scroll events from two divs nested under a main one. Implementation inspired from https://github.com/marcj/css-element-queries.

8 years agoAdd support for detached canvas element (#4591)
Simon Brunel [Tue, 1 Aug 2017 12:28:45 +0000 (14:28 +0200)] 
Add support for detached canvas element (#4591)

Allow to create a chart on a canvas not yet attached to the DOM (detection based on CSS animations described in https://davidwalsh.name/detect-node-insertion). The resize element (IFRAME) is added only when the canvas receives a parent or when `style.display` changes from `none`. This change also allows to re-parent the canvas under a different node (the resizer element following). This is a preliminary work for the DIV based resizer.

8 years agoChange `ticks.mode` to `scale.distribution` (#4582)
Simon Brunel [Sun, 30 Jul 2017 19:24:29 +0000 (21:24 +0200)] 
Change `ticks.mode` to `scale.distribution` (#4582)

Fix `ticks.mode` behavior when `ticks.source` is `auto`: the lookup table is now built from the data and not from the ticks, so data (and ticks) are correctly distributed along the scale. Rename the option to `distribution` (more explicit than `mode`) and since this option applies from now on the data, it seems better to have it under `scale` instead `scale.ticks`.

8 years agoChange `scale.ticks` back to an array of strings (#4573)
Simon Brunel [Sat, 29 Jul 2017 19:26:36 +0000 (21:26 +0200)] 
Change `scale.ticks` back to an array of strings (#4573)

Internal ticks are now stored as objects in the PRIVATE this._ticks member and must not be accessed directly from outside this class. this.ticks is around for a long time and hasn't been marked as private, so we can't change its structure without unexpected breaking changes. If you need to access the scale ticks, use scale.getTicks() instead.

8 years agoAllow specifying bar chart via {x, y} data points (#4565)
Ben McCann [Sat, 29 Jul 2017 19:22:52 +0000 (12:22 -0700)] 
Allow specifying bar chart via {x, y} data points (#4565)

8 years agoindex-y interaction mode + convert horizontal bar defaults to new mode (#4458)
Evert Timberg [Fri, 28 Jul 2017 22:07:28 +0000 (18:07 -0400)] 
index-y interaction mode + convert horizontal bar defaults to new mode (#4458)

index-y interaction mode + convert horizontal bar defaults to new mode

8 years agoNew time scale `ticks.source: 'data'` option (#4568)
Simon Brunel [Thu, 27 Jul 2017 04:41:09 +0000 (06:41 +0200)] 
New time scale `ticks.source: 'data'` option (#4568)

This new option value generates ticks from data (including labels from {t|x|y} data objects).

8 years agoInstructions to access resources built from master
andig [Tue, 25 Jul 2017 07:56:46 +0000 (09:56 +0200)] 
Instructions to access resources built from master

8 years agoRewrite unit test waitForResize helper (#4566)
Simon Brunel [Wed, 26 Jul 2017 11:33:45 +0000 (13:33 +0200)] 
Rewrite unit test waitForResize helper (#4566)

The original implementation tries to intercept events from the chart internal iframe, which ones failing on Chrome 60. Checking internals doesn't seem the best approach, instead we could consider that a chart has been resized after the resize method has been called and processed. So let's hook `Chart.resize` and callback once it's done.

8 years agoNew time scale `ticks.bounds` option (#4556)
Simon Brunel [Tue, 25 Jul 2017 08:12:53 +0000 (10:12 +0200)] 
New time scale `ticks.bounds` option (#4556)

`ticks.bounds` (`'data'`(default)|`'label'`): `data` preserves the data range while `labels` ensures that all labels are visible. This option is bypassed by the min/max time options.

Remove the useless time scale `_model` object containing private members: instead, make these members private (prefixed by `_`) part of the scale.

8 years agoAdd a note about breaking changes (#4555)
Ben McCann [Mon, 24 Jul 2017 12:49:26 +0000 (05:49 -0700)] 
Add a note about breaking changes (#4555)

8 years agoMove and rewrite time helpers (#4549)
Simon Brunel [Sun, 23 Jul 2017 15:41:12 +0000 (17:41 +0200)] 
Move and rewrite time helpers (#4549)

Move time helpers back into time scale, remove the `Chart.helpers.time namespace` and attempt to make the auto generation logic a bit simpler. The generate method doesn't anymore enforce min/max, the calling code needs to clamp timestamps if needed.

8 years agoHonour time scale min/max settings (#4522)
andig [Sat, 22 Jul 2017 12:22:44 +0000 (14:22 +0200)] 
Honour time scale min/max settings (#4522)

8 years agoEnforce spaces around infix/unary words operators (#4547)
Simon Brunel [Sat, 22 Jul 2017 12:13:09 +0000 (14:13 +0200)] 
Enforce spaces around infix/unary words operators (#4547)

Enable ESLint `space-infix-ops` and `space-unary-ops` (for words only) rules. Also added `samples` to the linting task to match Code Climate expectations.

http://eslint.org/docs/rules/space-infix-ops
http://eslint.org/docs/rules/space-unary-ops

8 years agoFix ESLint errors (#4485)
Ben McCann [Sat, 22 Jul 2017 07:19:06 +0000 (00:19 -0700)] 
Fix ESLint errors (#4485)

8 years agoAllow specifying the time axis via t attribute (#4533)
Ben McCann [Sat, 22 Jul 2017 06:33:22 +0000 (23:33 -0700)] 
Allow specifying the time axis via t attribute (#4533)

For time series charts it may make more sense to specify the horizontal axis using the variable `t`. This change will make it much easier to use the time scale with the financial chart, which takes in the data points `{t, o, h, l, c}`.

8 years agoRefactor padding parsing under helpers.options (#4544)
Simon Brunel [Fri, 21 Jul 2017 13:03:03 +0000 (15:03 +0200)] 
Refactor padding parsing under helpers.options (#4544)

New Chart.helpers.options.toPadding helpers that converts a number or object into a padding {top, right, bottom, left, height, width} object.

8 years agoMake `Chart.Element/elements.*` importable (#4540)
Simon Brunel [Fri, 21 Jul 2017 06:40:01 +0000 (08:40 +0200)] 
Make `Chart.Element/elements.*` importable (#4540)

8 years agoRemove duplicate npm install (#4542)
Ben McCann [Fri, 21 Jul 2017 06:21:29 +0000 (23:21 -0700)] 
Remove duplicate npm install (#4542)

8 years agoAdd support for line height CSS values (#4531)
Simon Brunel [Thu, 20 Jul 2017 17:20:54 +0000 (19:20 +0200)] 
Add support for line height CSS values (#4531)

The title plugin and scale title now accept lineHeight specified using unitless value (1.4), length ('1.4em' or '12px'), percentage ('200%') or keyword ('normal' === 1.2). The line height parsing has been refactored under the 'Chart.helpers.options' namespace. Also fix incorrect text positioning in the title plugin.

https://developer.mozilla.org/en-US/docs/Web/CSS/line-height

8 years agoNew time scale `ticks.mode/.source` options (#4507)
Simon Brunel [Wed, 19 Jul 2017 19:04:15 +0000 (21:04 +0200)] 
New time scale `ticks.mode/.source` options (#4507)

`ticks.source` (`'auto'`(default)|`'labels'`): `auto` generates "optimal" ticks based on min, max and a few more options (current `time` implementation`). `labels` generates ticks from the user given `data.labels` values (two additional trailing and leading ticks can be added if min and max are provided).

`ticks.mode` (`'linear'`(default)|`series`): `series` displays ticks at the same distance from each other, whatever the time value they represent, while `linear` displays them linearly in time: the distance between each tick represent the amount of time between their time values.

8 years agoAllow category labels definition at scale level (#4506)
andig [Wed, 19 Jul 2017 10:41:17 +0000 (12:41 +0200)] 
Allow category labels definition at scale level (#4506)

8 years agoAdd link to Java integration (#4527)
Marceau Dewilde [Tue, 18 Jul 2017 22:26:02 +0000 (00:26 +0200)] 
Add link to Java integration (#4527)

8 years agoMake `Chart.defaults/Ticks/Interaction` importable (#4512)
Simon Brunel [Sun, 16 Jul 2017 17:38:19 +0000 (19:38 +0200)] 
Make `Chart.defaults/Ticks/Interaction` importable (#4512)

Default options can now be accessed by importing `core/core.defaults`. The returned object acts as a singleton and is populated when importing classes that expose their own default values (meaning that importing only `code.defaults` results in an empty object). Also make `Chart.Ticks` and `Chart.Interaction` importable since existing defaults rely on these values.

Add the `defaults._set` method that make easier declaring new defaults by merging given values with existing ones for a specific scope (`global`, `scale`, `bar`, etc).

8 years agoMake `Chart.platform` importable (#4509)
Simon Brunel [Sun, 16 Jul 2017 09:02:25 +0000 (11:02 +0200)] 
Make `Chart.platform` importable (#4509)

8 years agoFix copy paste error in new docs with respect to settings for line and radar charts...
Evert Timberg [Sat, 15 Jul 2017 20:39:27 +0000 (16:39 -0400)] 
Fix copy paste error in new docs with respect to settings for line and radar charts. (#4510)

8 years agoMake `Chart.helpers` importable (#4479)
Simon Brunel [Sat, 15 Jul 2017 13:13:56 +0000 (15:13 +0200)] 
Make `Chart.helpers` importable (#4479)

Properly export helpers and remove dependencies to `Chart.helpers`. Helpers can now be accessed from `src/helpers/index.js` (`var helpers = require('path/to/helpers/index')`, instead of `var helpers = Chart.helpers`).

8 years agoFix labelOffset not working for vertical axes (#4249)
Suhaib Khan [Sat, 15 Jul 2017 08:19:16 +0000 (13:49 +0530)] 
Fix labelOffset not working for vertical axes (#4249)

8 years agoFix links in documentations (#4477)
Adrian Liaw [Sun, 9 Jul 2017 12:58:18 +0000 (20:58 +0800)] 
Fix links in documentations (#4477)

* Fix relative links in documentation of configurations
* Fix relative link of 'Time Units'
* Fix relative links for chart types documentations
* Fix the release version link in developers/plugins

8 years agoSimplify formulas based on code review
Simon Brunel [Sat, 8 Jul 2017 13:38:40 +0000 (15:38 +0200)] 
Simplify formulas based on code review

8 years agoMove easing effects in separate file + unit tests
Simon Brunel [Sat, 8 Jul 2017 07:44:00 +0000 (09:44 +0200)] 
Move easing effects in separate file + unit tests

8 years agoUpdate link to documentation for previous versions
Alexander Paterson [Wed, 5 Jul 2017 12:11:29 +0000 (20:11 +0800)] 
Update link to documentation for previous versions

8 years agoClip chart area before filling
Akihiko Kusanagi [Sun, 2 Jul 2017 06:40:00 +0000 (15:40 +0900)] 
Clip chart area before filling
- Add clip and unclip around doFill() call
- This fixes #4450

8 years agoAdd a note on how to use getElementAtEvent in a click handler
etimberg [Mon, 3 Jul 2017 22:00:03 +0000 (18:00 -0400)] 
Add a note on how to use getElementAtEvent in a click handler

8 years agoUse proper reverse option in radial linear scale
etimberg [Mon, 3 Jul 2017 23:50:08 +0000 (19:50 -0400)] 
Use proper reverse option in radial linear scale

8 years agoSupport an array for line chart pointBorderWidth
Evert Timberg [Tue, 4 Jul 2017 01:32:10 +0000 (21:32 -0400)] 
Support an array for line chart pointBorderWidth

8 years agoRewrite the clone and merge helpers (#4422)
Simon Brunel [Sat, 1 Jul 2017 12:51:38 +0000 (14:51 +0200)] 
Rewrite the clone and merge helpers (#4422)

The `clone` method now accepts any type of input but also recursively perform a deep copy of the array items. Rewrite the `configMerge` and `scaleMerge` helpers which now rely on a new generic and customizable `merge` method, that one accepts a target object in which multiple sources are deep copied. Note that the target (first argument) is not cloned and will be modified after calling `merge(target, sources)`. Add a `mergeIf` helper which merge the source properties only if they do not exist in the target object.

8 years agoClamp radius when drawing rounded rectangle (#4448)
Simon Brunel [Sat, 1 Jul 2017 12:08:20 +0000 (14:08 +0200)] 
Clamp radius when drawing rounded rectangle (#4448)

8 years agoRemove `.js` extensions when requiring a file (#4427)
Let Aurn IV [Sat, 1 Jul 2017 07:59:26 +0000 (09:59 +0200)] 
Remove `.js` extensions when requiring a file (#4427)

8 years agoIncrease ESLint complexity and add config for tests (#4421)
Simon Brunel [Sat, 1 Jul 2017 07:55:11 +0000 (09:55 +0200)] 
Increase ESLint complexity and add config for tests (#4421)

Raise the cyclomatic complexity to 10 which seems to better match the project coding style and still reasonable (6 being quite low). Also move unit tests specific eslint rules in the cascaded `./test/.eslintrc` file (previously in `gulp.js`).

8 years agoreplace self closing script tag with open and closing tags
Justin Ledford [Thu, 29 Jun 2017 16:46:35 +0000 (11:46 -0500)] 
replace self closing script tag with open and closing tags

8 years agoticks.padding option applies to both vertical and horizontal axes
etimberg [Thu, 22 Jun 2017 01:52:26 +0000 (21:52 -0400)] 
ticks.padding option applies to both vertical and horizontal axes

8 years agoWhen all datasets are hidden, the linear scale defaults to a range of 0 - 1.
etimberg [Sun, 25 Jun 2017 13:06:22 +0000 (09:06 -0400)] 
When all datasets are hidden, the linear scale defaults to a range of 0 - 1.
If `ticks.min` was set this would not set the range correctly.
Added a test to cover this case as well

8 years agoFix non-passive event listener warning in Chrome
Simon Brunel [Sun, 25 Jun 2017 10:14:28 +0000 (12:14 +0200)] 
Fix non-passive event listener warning in Chrome

Deprecate `addEvent` and `removeEvent`, and move implementation in `platform.dom.js`. Add 'options' feature detection to register event listeners as passive and prevent warning in Chrome.

8 years agoUpdate scatter chart default config to hide lines
etimberg [Thu, 15 Jun 2017 22:26:15 +0000 (18:26 -0400)] 
Update scatter chart default config to hide lines

8 years agoEnsure deprecated unitStepSize property of time scale is respected (#4401)
Evert Timberg [Sun, 25 Jun 2017 12:37:38 +0000 (08:37 -0400)] 
Ensure deprecated unitStepSize property of time scale is respected (#4401)

8 years agoChange `valueAtIndexOrDefault` behavior (#4423)
Simon Brunel [Sun, 25 Jun 2017 08:54:37 +0000 (10:54 +0200)] 
Change `valueAtIndexOrDefault` behavior (#4423)

For consistency with `valueOrDefault`, `valueAtIndexOrDefault` now returns null if `value` (expected array) is null. Also get rid of the superfluous `get` prefix in `getValueOrDefault` and `getValueAtIndexOrDefault`.

8 years agoCleanup and reorganize core and canvas helpers
Simon Brunel [Sat, 24 Jun 2017 09:46:06 +0000 (11:46 +0200)] 
Cleanup and reorganize core and canvas helpers

Move some of the "core" and "canvas" utils in `helpers.core.js` and `helpers.canvas.js` and introduce the new `isNullOrUndef` and `isObject` helpers. Deprecate `indexOf` and rename `drawRoundedRectangle` to `roundedRect` which now creates a simple `rect` path if radius is 0. Write missing unit tests for the moved helpers.