]> git.ipfire.org Git - thirdparty/Chart.js.git/log
thirdparty/Chart.js.git
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.

8 years agoFix error when legend label options are not defined (#4402)
Evert Timberg [Sat, 24 Jun 2017 15:35:46 +0000 (11:35 -0400)] 
Fix error when legend label options are not defined (#4402)

8 years agoUpdate Display Format table
Akihiko Kusanagi [Fri, 23 Jun 2017 03:38:53 +0000 (20:38 -0700)] 
Update Display Format table
- Up to date with the latest code
- Added Example column

8 years agoAdd aria-hidden=true attribute to hidden iframe for resizing (#4400)
Karan Bhatia [Fri, 23 Jun 2017 22:14:16 +0000 (15:14 -0700)] 
Add aria-hidden=true attribute to hidden iframe for resizing (#4400)

Add aria-hidden=true attribute to hidden iframe for resizing. This prevents screen readers in ItemMode from navigating to the hidden iframe.

8 years agoLine height setting for scale titles. The text is centered within the line height...
etimberg [Mon, 19 Jun 2017 01:21:37 +0000 (21:21 -0400)] 
Line height setting for scale titles. The text is centered within the line height, so setting the line height to a size
greater than the font size moves it away from the axis edge.

8 years agoFix arguments in plugin interface description
Akihiko Kusanagi [Thu, 22 Jun 2017 16:53:52 +0000 (09:53 -0700)] 
Fix arguments in plugin interface description
* Fixed arguments in IPlugin#before/afterDatasetUpdate description
* Fixed arguments in IPlugin#before/afterDatasetDraw description

8 years agoEnsure that chart dimensions are always >= 0
Peter-Van-Drunen [Fri, 23 Jun 2017 22:08:16 +0000 (18:08 -0400)] 
Ensure that chart dimensions are always >= 0

Elements were resizing incorrectly if they were regenerated while the chart was in a div that was display:none. Added a check to avoid this issue. Resolves #4397

8 years agoAdd description on new dataset update and draw plugin hooks
Akihiko Kusanagi [Thu, 22 Jun 2017 23:25:56 +0000 (16:25 -0700)] 
Add description on new dataset update and draw plugin hooks

8 years agoWording error
Ben S [Thu, 22 Jun 2017 11:08:00 +0000 (13:08 +0200)] 
Wording error

correct wording error

8 years agoMultiple lines of text in the chart title
etimberg [Thu, 15 Jun 2017 22:55:01 +0000 (18:55 -0400)] 
Multiple lines of text in the chart title

8 years agoAdd note regarding non-existant fonts
etimberg [Mon, 19 Jun 2017 00:59:45 +0000 (20:59 -0400)] 
Add note regarding non-existant fonts

8 years agoHighCharts is not open source (#4383)
Martin Bagge / brother [Fri, 16 Jun 2017 10:48:29 +0000 (12:48 +0200)] 
HighCharts is not open source (#4383)

According to the (issue tracker of highcharts)[https://github.com/highcharts/highcharts/issues/4405#issuecomment-125124004] they do not consider the code open source. It's available for reading but that's about it.

The code is provided under CC-BY-NC via github.

See also:
https://shop.highsoft.com/faq#Non-Commercial-0

8 years agoTime axis tick formatting with major and minor units (#4268)
Andrew [Thu, 15 Jun 2017 11:20:16 +0000 (14:20 +0300)] 
Time axis tick formatting with major and minor units (#4268)

Working towards creating the TimeSeries scale, this PR adds formatting for major and minor ticks on axes.

8 years agoFixed tiny typo in title.md
Julian Rademacher [Mon, 12 Jun 2017 13:17:27 +0000 (15:17 +0200)] 
Fixed tiny typo in title.md

8 years agoSupport hover animation duration during updates (#4300)
Ricardo Costa [Sun, 11 Jun 2017 16:06:39 +0000 (17:06 +0100)] 
Support hover animation duration during updates (#4300)

See discussion in the issue for context and possible approaches.

When invoking update() inside an event handler, such as onHover,
`options.hover.animationDuration` was not being respected. Given that
some use cases may require additional animation properties for the
manual update call, this commit changes that method signature to accept
a configuration object.

This object provides backwards compatibility with duration and lazy
properties, and also introduces the easing property so that the event
animation is different from the global one.

Add tests that guarantee that when update is called manually with
arguments, it properly builds the _bufferedRequest or calls render with
the proper arguments.
It includes test cases for when update is called with legacy arguments
(duration and lazy) instead of the config object.

.update() documentation was previously updated but .render() was left
out. Since the backwards compatible change was also made to render(),
this commit adds documentation for it.

8 years agoFix filling between datasets of different lengths
Simon Brunel [Sat, 10 Jun 2017 11:52:37 +0000 (13:52 +0200)] 
Fix filling between datasets of different lengths

8 years agoFix Tiny Typo in Labelling.md
Spencer Dellis [Thu, 8 Jun 2017 17:58:11 +0000 (13:58 -0400)] 
Fix Tiny Typo in Labelling.md

8 years agoFix round option for time scales
etimberg [Thu, 8 Jun 2017 00:49:22 +0000 (20:49 -0400)] 
Fix round option for time scales

8 years agoMake sure that the border width of the tooltip color box is always correct
Evert Timberg [Tue, 6 Jun 2017 23:03:31 +0000 (19:03 -0400)] 
Make sure that the border width of the tooltip color box is always correct

8 years agoUse the latest 6.x LTS release for Travis builds (#4346)
Ben McCann [Wed, 7 Jun 2017 21:21:07 +0000 (14:21 -0700)] 
Use the latest 6.x LTS release for Travis builds (#4346)

8 years agoFix broken link on animations page #4324
Raquel Guimaraes [Sun, 4 Jun 2017 23:12:16 +0000 (20:12 -0300)] 
Fix broken link on animations page #4324

8 years agoFix vertical alignment of legend labels (#4318)
Evert Timberg [Sun, 4 Jun 2017 17:34:05 +0000 (13:34 -0400)] 
Fix vertical alignment of legend labels (#4318)

Ensure that disabled legend style is drawn in the center of the text and that the text is correctly centered in the box.

8 years agoProvide a blank default global layout option (#4319)
Evert Timberg [Sun, 4 Jun 2017 17:32:44 +0000 (13:32 -0400)] 
Provide a blank default global layout option (#4319)

8 years agoAdded 'devicePixelRatio' option to override the window's DPR setting (#4270)
OlduwanSteve [Sun, 4 Jun 2017 16:57:55 +0000 (17:57 +0100)] 
Added 'devicePixelRatio' option to override the window's DPR setting (#4270)

8 years agoFix incorrect unitStepSize option. It should be stepSize (#4320)
Evert Timberg [Sun, 4 Jun 2017 16:51:27 +0000 (12:51 -0400)] 
Fix incorrect unitStepSize option. It should be stepSize (#4320)

8 years agoFix inconsistent aspect ratio
Jerome Touffe-Blin [Sun, 26 Mar 2017 02:44:26 +0000 (13:44 +1100)] 
Fix inconsistent aspect ratio

8 years agoImplemented aligment by senior unit in time axis. (#4267)
Andrew [Mon, 29 May 2017 22:40:10 +0000 (01:40 +0300)] 
Implemented aligment by senior unit in time axis. (#4267)

Implemented alignment by major unit in the time scale. This allows showing the first tick of a larger unit like days in a special way and is part of the basis of the time series scale.

8 years agoFix onHover event not being triggered (#4297)
Ricardo Costa [Sun, 28 May 2017 21:23:20 +0000 (22:23 +0100)] 
Fix onHover event not being triggered (#4297)

Fix onHover event not being triggered

The core controller was looking at the wrong object (options.hover) to
find the function to be called on hover. The function is provided on the
top level options object (options.onHover).

By using the helper function, there's no need to verify if the callback
is defined, as the helper already does that.

Fixes #4296

8 years agoAdd tooltip textLabelColor callback (#4199)
ApoorvA [Sun, 28 May 2017 12:39:29 +0000 (18:09 +0530)] 
Add tooltip textLabelColor callback (#4199)

Add a new tooltip callback `labelTextColor` that returns the colour for each item in the body of the tooltip.

Fixes issue #4191

8 years agoAdd hard coded integer constants for *_SAFE_INTEGER which are not available on IE
Stephen Boissiere [Sat, 27 May 2017 14:58:18 +0000 (15:58 +0100)] 
Add hard coded integer constants for *_SAFE_INTEGER which are not available on IE

8 years agoUpgrade dependencies
Ben McCann [Thu, 25 May 2017 16:55:21 +0000 (09:55 -0700)] 
Upgrade dependencies

8 years agoRefactor time scale methods into a common location
Ben McCann [Fri, 5 May 2017 04:34:23 +0000 (21:34 -0700)] 
Refactor time scale methods into a common location

8 years agoUpgrade dependencies (#4272)
Ben McCann [Thu, 25 May 2017 15:53:37 +0000 (08:53 -0700)] 
Upgrade dependencies (#4272)

8 years agoFix code climate badge and link (#4277)
Ben McCann [Thu, 25 May 2017 15:52:39 +0000 (08:52 -0700)] 
Fix code climate badge and link (#4277)

8 years agoAttempt to fix the failing deploy step
Simon Brunel [Thu, 25 May 2017 13:53:14 +0000 (15:53 +0200)] 
Attempt to fix the failing deploy step

8 years agoBump version to v2.6.0 (#4237) 4236/head 4282/head
Evert Timberg [Fri, 19 May 2017 20:08:33 +0000 (16:08 -0400)] 
Bump version to v2.6.0 (#4237)

8 years agoDeploy to GitHub pages (#4256)
Simon Brunel [Fri, 19 May 2017 19:58:34 +0000 (21:58 +0200)] 
Deploy to GitHub pages (#4256)

Add Travis CI task to deploy the docs, samples and dist files to chartjs.github.io for the `release` and `master` branches. A `latest` symbolic links is also created for each folder to the highest version (or `master` if any).

8 years agoAdd GA tracking code to docs
Simon Brunel [Fri, 19 May 2017 19:43:33 +0000 (21:43 +0200)] 
Add GA tracking code to docs

8 years agoFix invalid link in area.md (#4257)
Xingan Wang [Sat, 13 May 2017 17:30:23 +0000 (10:30 -0700)] 
Fix invalid link in area.md (#4257)

8 years agoEnable the 'search-plus' GitBook plugin
Simon Brunel [Sat, 13 May 2017 16:17:34 +0000 (18:17 +0200)] 
Enable the 'search-plus' GitBook plugin

8 years agoUse https to load scripts from CDN in samples (#4255)
Ben McCann [Sat, 13 May 2017 15:24:00 +0000 (08:24 -0700)] 
Use https to load scripts from CDN in samples (#4255)

8 years agoAdded width + height arguments to ctx.drawImage
Jamie McElwain [Sat, 13 May 2017 11:11:52 +0000 (12:11 +0100)] 
Added width + height arguments to ctx.drawImage

Previous functionality meant that images would be drawn at their source file size regardless of whether custom width or height properties were set.

8 years agoMake "dedicated to the chart canvas" a requirement (#4253)
Simon Brunel [Sat, 13 May 2017 12:14:47 +0000 (14:14 +0200)] 
Make "dedicated to the chart canvas" a requirement (#4253)

8 years agoFix RequireJS doc to use UMD file instead (#4252)
Simon Brunel [Sat, 13 May 2017 12:14:02 +0000 (14:14 +0200)] 
Fix RequireJS doc to use UMD file instead (#4252)

8 years agoDocument the new filling modes and options (#4251)
Simon Brunel [Sat, 13 May 2017 12:13:05 +0000 (14:13 +0200)] 
Document the new filling modes and options (#4251)

8 years agoinitial data update docs
etimberg [Sun, 23 Apr 2017 23:53:31 +0000 (19:53 -0400)] 
initial data update docs

8 years agoRemove executable bit from js files (#4222)
Ben McCann [Sun, 7 May 2017 17:35:17 +0000 (10:35 -0700)] 
Remove executable bit from js files (#4222)

8 years agoRemove unnecessary variable
Ben McCann [Wed, 26 Apr 2017 03:43:18 +0000 (20:43 -0700)] 
Remove unnecessary variable

8 years agoFix legend and title layout options update
Simon Brunel [Sun, 23 Apr 2017 17:58:11 +0000 (19:58 +0200)] 
Fix legend and title layout options update

8 years agoAdd financial chart type to plugin docs
Ben McCann [Tue, 25 Apr 2017 02:21:47 +0000 (19:21 -0700)] 
Add financial chart type to plugin docs

8 years agoRemove malformed comment
Ben McCann [Wed, 26 Apr 2017 03:29:40 +0000 (20:29 -0700)] 
Remove malformed comment

Fixes https://github.com/chartjs/Chart.js/issues/4181

8 years agoMake it clear that labels need to be specified when using a category axis on a line...
etimberg [Sat, 22 Apr 2017 18:47:00 +0000 (14:47 -0400)] 
Make it clear that labels need to be specified when using a category axis on a line chart

8 years agoFix failing instanceof when reading context
Simon Brunel [Sat, 22 Apr 2017 07:49:10 +0000 (09:49 +0200)] 
Fix failing instanceof when reading context

`instanceof HTMLCanvasElement/CanvasRenderingContext2D` fails when the item is inside an iframe or when running in a protected environment. We could guess the types from their toString() value but let's keep things flexible and assume it's a sufficient condition if the item has a context2D which has item as `canvas`.

8 years agoEnhance the responsive documentation
Simon Brunel [Sat, 22 Apr 2017 11:59:56 +0000 (13:59 +0200)] 
Enhance the responsive documentation

Make sure to explain responsiveness limitations with CANVAS elements and how to correctly setup a responsive chart using a dedicated and relatively positioned div wrapper.

8 years agoFix hidden charts hanging the browser
Thomas Redston [Tue, 4 Apr 2017 00:48:55 +0000 (01:48 +0100)] 
Fix hidden charts hanging the browser

Ensure width cannot be greater than maxWidth. Similar to `minSize.height` calculation.

8 years agoRemove extraneous period
Ben McCann [Mon, 17 Apr 2017 14:28:35 +0000 (07:28 -0700)] 
Remove extraneous period

8 years agoCombine the two contributing docs
Ben McCann [Thu, 13 Apr 2017 21:59:13 +0000 (14:59 -0700)] 
Combine the two contributing docs

8 years agoEnhancement: adds step-after functionality, true defaults to step-before (#4065)
Eric Nikolay Katz [Sun, 16 Apr 2017 20:13:13 +0000 (16:13 -0400)] 
Enhancement: adds step-after functionality, true defaults to step-before (#4065)

* Adds step-after functionality, true defaults to step-before

* Update stepped line sample to include all variations of steppedLine configurations

* Update documentation on steppedLine values

* Add tests for new steppedLine values 'before' and 'after'

8 years agoFix pointRadius and pointHitRadius settings for radar charts
etimberg [Tue, 28 Mar 2017 23:13:09 +0000 (19:13 -0400)] 
Fix pointRadius and pointHitRadius settings for radar charts

8 years agoFixed calculation of scale min and max when dataset contains no values (#4064)
GabrielMancik [Sat, 15 Apr 2017 16:37:49 +0000 (18:37 +0200)] 
Fixed calculation of scale min and max when dataset contains no values (#4064)

* Fixed different calculation of scale min and max when dataset contains no values
* Removed trailing spaces
* Added test for correct min/max calculation
* Removed trailing spaces

8 years agoFix broken link to point to correct sample file.
Joe B. Lewis [Sat, 15 Apr 2017 12:08:55 +0000 (17:38 +0530)] 
Fix broken link to point to correct sample file.

8 years agoFix and refactor bar controllers
Simon Brunel [Sun, 19 Mar 2017 16:51:18 +0000 (17:51 +0100)] 
Fix and refactor bar controllers

Merge most of the horizontalBar controller into the bar one but also fix stack groups and bar positioning when scales are stacked or when a min and/or max tick values are explicitly defined. Note that this is a breaking change for derived controllers that rely on the following removed methods: `calculateBarBase`, `calculateBarX`, `calculateBarY`, `calculateBarWidth` and `calculateBarHeight`.

8 years agoscale service - respect new weight scale option for axes ordering (#4094) 4128/head
cizmiak [Tue, 4 Apr 2017 23:42:25 +0000 (01:42 +0200)] 
scale service - respect new weight scale option for axes ordering (#4094)

* respect new scale option 'order' when ordering scales

* scale service - respect new weight scale option for axes ordering

* added test for scale ordering by weight

* removed trailing spaces from layout weight scale order test

8 years agoAdds a better error message when the chart type is incorrect. Previously the user...
etimberg [Sat, 25 Mar 2017 23:34:55 +0000 (19:34 -0400)] 
Adds a better error message when the chart type is incorrect. Previously the user got a message about `type` being undefined.
This gives something that's easier to understand and debug.

8 years agoAdd live samples back to docs for each chart type
etimberg [Sun, 2 Apr 2017 01:22:06 +0000 (21:22 -0400)] 
Add live samples back to docs for each chart type

8 years agoTime scale improvements to improve performance and reliability
Thomas Redston [Sun, 2 Apr 2017 12:49:00 +0000 (14:49 +0200)] 
Time scale improvements to improve performance and reliability

* Make parseTime private
* start on fixing time scale
* Reimplement existing functionality
* Tidy tests
* Fix labels for non-linearly sized units

Months, quarters and years have non-constant numbers of seconds. A scale that's linear WRT milliseconds produces incorrect tick labels due to the label formatting losing precision (eg year labels lose month and day so a label of 2016-12-32 displays as 2016 instead of 2017).

* Re-implement tick generation

As in v2.5

8 years agoUpdate the tooltip with a new `caretPadding` setting. Previously this value was essen...
etimberg [Tue, 28 Mar 2017 00:19:57 +0000 (20:19 -0400)] 
Update the tooltip with a new `caretPadding` setting. Previously this value was essentially hard coded to
 2 because of a typo that read it from the positioner output. Based on #3599 we agreed to make this into
a config setting.

8 years agoFixed misplaced data points on category scale
Martin Zürn [Mon, 27 Mar 2017 22:02:56 +0000 (00:02 +0200)] 
Fixed misplaced data points on category scale

* Fixed issue, that category scale shows data points misplaced. See #4060
* Cleaned code
* Fixed Irregular whitespace
* Fixed error in case value is undefined
* Verified that no error is thrown in case value === null

8 years agoMove legend and title in the plugins folder (#4076)
Simon Brunel [Sat, 25 Mar 2017 17:28:54 +0000 (18:28 +0100)] 
Move legend and title in the plugins folder (#4076)

8 years agoAdd `gulp unittest --coverage` argument (#4075)
Simon Brunel [Sat, 25 Mar 2017 17:26:45 +0000 (18:26 +0100)] 
Add `gulp unittest --coverage` argument (#4075)

Coverage data are now generated by running `gulp unittest` with the `--coverage` argument: unit tests are then executed a single time on Travis. The gulp `coverage` task has been removed and `karma.coverage.conf.ci.js` merged into `karma.conf.ci.js`.

Update documentation with gulp commands (and remove them from `README.md`) and remove unused `config.jshintrc` (oversight from #3256). Delete `thankyou.md` which has been merged into `README.md`.

8 years agoAdd link to plugin that creates a stacked percentage chart
y-take [Fri, 24 Mar 2017 22:57:08 +0000 (07:57 +0900)] 
Add link to plugin that creates a stacked percentage chart

8 years agoUpdate line-customTooltips.html (Re issue #4038 )
ellie [Wed, 22 Mar 2017 10:35:50 +0000 (03:35 -0700)] 
Update line-customTooltips.html (Re issue  #4038  )

Add window scroll position to tooltip position calculation so they show up in the intended place instead of potentially off-screen! Moved tooltips inside the canvas parent container since they are being positioned in terms of its location

8 years agoZero line dash options (#4019)
Lee N Dobryden [Tue, 21 Mar 2017 10:38:09 +0000 (03:38 -0700)] 
Zero line dash options (#4019)

* Add of zero line border dash options
* Update Readme with zero line border dash config options

8 years agoReorganize samples and list them in index.html (#4043)
Simon Brunel [Tue, 21 Mar 2017 00:40:44 +0000 (01:40 +0100)] 
Reorganize samples and list them in index.html (#4043)

8 years agoDo not draw tooltips that have no items (#4034)
Samuel Jo [Tue, 21 Mar 2017 00:40:28 +0000 (20:40 -0400)] 
Do not draw tooltips that have no items (#4034)

8 years agoFix radar chart horizontal position (#4032)
Hiroshi Shirosaki [Tue, 21 Mar 2017 00:39:18 +0000 (09:39 +0900)] 
Fix radar chart horizontal position (#4032)

Radar chart position is not center horizontally with v2.5.0.

Right and left of `furthestLimits` would be switched wrongly on
this refactoring commit.
https://github.com/chartjs/Chart.js/pull/3625/commits/e1606f88ed4805815038cba4fdcd6211d7490356

8 years agoFix for stacked bar charts with log axes (#4010)
Evert Timberg [Tue, 21 Mar 2017 00:38:15 +0000 (20:38 -0400)] 
Fix for stacked bar charts with log axes (#4010)

* Undo fix for #3585 since it has broken the stacked bar charts when the axis has a user defined minimum value.

* When a value of 0 is requested for a vertical logarithmic axis, return the bottom point

8 years agoAvoid errors when rendering serverside (#3909)
Bohdan Khorolets [Tue, 21 Mar 2017 00:37:34 +0000 (02:37 +0200)] 
Avoid errors when rendering serverside (#3909)

8 years agoUpdate the docs structure/content to use GitBook (#3751)
Evert Timberg [Tue, 21 Mar 2017 00:36:54 +0000 (20:36 -0400)] 
Update the docs structure/content to use GitBook (#3751)

Update the docs structure/content to use GitBook

8 years agoCorrectly handle decimal display size (#4009)
Simon Brunel [Sat, 18 Mar 2017 10:54:56 +0000 (11:54 +0100)] 
Correctly handle decimal display size (#4009)

Fix the `readUsedSize` regular expression to correctly parse (truncate) pixel decimal values.

8 years agoAdd support to fill between datasets (#4008)
Simon Brunel [Sat, 18 Mar 2017 10:08:57 +0000 (11:08 +0100)] 
Add support to fill between datasets (#4008)

The `fill` option now accepts the index of the target dataset (number) or a string starting by "+" or "-" followed by a number representing the dataset index relative to the current one (e.g. `fill: "-2"` on dataset at index 3 will fill to dataset at index 1). It's also possible to "propagate" the filling to the target of an hidden dataset (`options.plugins.filler.propagate`). Fill boundaries `zero`, `top` and `bottom` have been deprecated and replaced by `origin`, `start` and `end`.

Implementation has been moved out of the line element into a new plugin (`src/plugins/plugin.filler.js`) and does not rely anymore on the deprecated model `scaleTop`, `scaleBottom` and `scaleZero` values. Drawing Bézier splines has been refactored in the canvas helpers (note that `Chart.helpers.canvas` is now an alias of `Chart.canvasHelpers`).

Add 3 new examples and extend utils with a pseudo-random number generator that can be initialized with `srand`. That makes possible to design examples starting always with the same initial data.

8 years agoIntroduce unit test based on image comparison (#3988)
Simon Brunel [Sun, 5 Mar 2017 16:49:12 +0000 (17:49 +0100)] 
Introduce unit test based on image comparison (#3988)

Attempt to make easier the creation of unit tests that check the drawing output. Until now, this was done by checking calls on a 'fake' context, which is hard to maintain (need to update pixel values by hands) and also not reliable when optimizing code (i.e. different calls sequence but same result).

As of now, it's possible to define 'auto' tests based on JSON/PNG fixtures: chart is generated from the JSON file and compared to the associated PNG image. The image diff is done using `pixelmatch`. As an example (and in preparation of the `filler` plugin), add auto tests for the line element `fill` options.

8 years agoCleanup and upgrade unit tests environment
Simon Brunel [Sat, 4 Mar 2017 15:47:53 +0000 (16:47 +0100)] 
Cleanup and upgrade unit tests environment

`karma.conf.ci.js` has been merged into `karma.conf.js` for local testing consistency: `gulp unittestWatch` has been replaced by `gulp unittest --watch` and thus use exactly the same config file. Upgrade to latest jasmine and karma packages and remove deprecated `gulp-karma` dependency (directly use `karma.Server` in gulp).

Split `test/mockContext.js` into smaller `test/jasmine.*` modules to make easier unit tests maintenance and finally, move all `*.test.js` files under the `test/specs` folder.

8 years agoFix shorthand `legend: false` and `title: false`
Simon Brunel [Sat, 4 Mar 2017 11:21:51 +0000 (12:21 +0100)] 
Fix shorthand `legend: false` and `title: false`

Prevent attempt to remove the legend or title layout items if they haven't been created but also check if the item to remove is registered with the layout manager to avoid removing the wrong box `splice(-1, 1)`. Add ids to the legend and title plugins to allow to fully disable them (`options: {plugins: {legend: false, title: false}}`).

8 years agoAdded a `maxBarThickness` setting for bar charts xAxis (#3963)
Cătălin Pintea [Sat, 4 Mar 2017 00:21:48 +0000 (02:21 +0200)] 
Added a `maxBarThickness` setting for bar charts xAxis (#3963)

Added a `maxBarThickness` setting for bar charts xAxis

8 years agoSplit radial scale lineArc setting into a combination of existing and new settings.
Evert Timberg [Wed, 11 Jan 2017 01:05:35 +0000 (20:05 -0500)] 
Split radial scale lineArc setting into a combination of existing and new settings.
gridLines.circular is a new option that toggles circular lines. This allows radar charts with circular lines #3082
pointLabels.display is a new option that toggles the display of point labels.
The existing angleLines.display is used with the new pointLabels.display setting is used to trigger the radar like settings.
This required changing the default polar area config.

8 years agoFlatten animation object and fix callbacks
Simon Brunel [Sat, 25 Feb 2017 10:51:47 +0000 (11:51 +0100)] 
Flatten animation object and fix callbacks

Animation callbacks now receives `animationObject` directly with a reference on the associated chart (`animation.chart`), which deprecates `animation.animationObject` and `animation.chartInstance`. Also fix missing `onComplete` animation argument and make sure that an animation object is passed even when animations are disabled.

8 years agoHandle incoming model values on element transition
Simon Brunel [Sat, 25 Feb 2017 12:06:36 +0000 (13:06 +0100)] 
Handle incoming model values on element transition

If a value is set on the model after `pivot()` has been called, the view wasn't initialized and the animation started from 0. Now, `_start` and incomplete `_view` are initialized to the model value during the transition (no initial implicit transition).

Also remove exception handling when animating a string (color), which is faster when string are not valid colors (e.g. tooltip position). It requires to update `chartjs-color` to version 2.1.0.

8 years agoFixed built-in auto skip caused by previous commit (#3904)
Jerry Chang [Sun, 19 Feb 2017 02:34:08 +0000 (18:34 -0800)] 
Fixed built-in auto skip caused by previous commit (#3904)

8 years agoAdd test for layout service weight ordering
etimberg [Sat, 25 Feb 2017 17:05:36 +0000 (12:05 -0500)] 
Add test for layout service weight ordering

8 years agoLayout service supports a new order setting to configure how boxes are ordered on...
etimberg [Fri, 20 Jan 2017 22:29:31 +0000 (17:29 -0500)] 
Layout service supports a new order setting to configure how boxes are ordered on left and right edges

8 years agoFix use of reserved keyword as a parameter name
Evert Timberg [Wed, 22 Feb 2017 01:34:50 +0000 (20:34 -0500)] 
Fix use of reserved keyword as a parameter name

8 years agofading tooltip
Adam Kirk [Wed, 22 Feb 2017 16:42:26 +0000 (09:42 -0700)] 
fading tooltip

8 years agoRefactored drawCaret and drawBackground functions to draw the background together...
Marcelo Tedeschi [Wed, 8 Feb 2017 08:09:48 +0000 (09:09 +0100)] 
Refactored drawCaret and drawBackground functions to draw the background together with the caret in the same path