Simon Brunel [Sat, 21 May 2016 20:53:58 +0000 (22:53 +0200)]
Refactor controller scale methods
Rewrite these two methods to reduce code duplication. Note that options.scale is not anymore mapped to 'radialScale' ID but to 'scale' ID (see ensureScalesHaveIDs), since this ID is not referenced anywhere in the code base.
Simon Brunel [Fri, 20 May 2016 21:42:24 +0000 (23:42 +0200)]
Refactor addElements and addElementAndReset
Data controllers should now rarely implement addElements and addElementAndReset but instead should define dataElementType (and optionally datasetElementType). Also remove some dead code (e.g. numBars, colorForNewElement, etc.).
Simon Brunel [Tue, 17 May 2016 11:32:40 +0000 (13:32 +0200)]
Optimize element.point and controller.line
Change some helpers.each() to `for` loops when iterating on a potentially large number of items and use more local variables when appropriate (making the minified build a bit smaller).
Simon Brunel [Mon, 16 May 2016 21:31:47 +0000 (23:31 +0200)]
Remove useless hasOwnProperty checks
The Chart.helpers.each method uses Object.keys() to iterates on the object *own enumerable properties*, meaning that checking if object.hasOwnProperty() is useless.
Simon Brunel [Sat, 14 May 2016 21:35:32 +0000 (23:35 +0200)]
Travis GitHub Releases (#2552)
* Make Travis to deploy built files for tags
See https://docs.travis-ci.com/user/deployment/releases
* Remove and ignore dist/* files
Travis now builds and deploys these files for all tags, so we don't need to have them on the repository anymore.
* Add download links to the latest version
Remove outdated *standard build* and *bundled with Moment.js* links from the documentation and add a link to the latest GitHub release, from where the user can download `*.js` files.
Simon Brunel [Sat, 14 May 2016 17:35:35 +0000 (19:35 +0200)]
Bump chartjs-color to version 2.0.0 (#2549)
Fix color animation because the color lib changed the `mix` implementation to match SASS behavior, so the weight specifies the amount of the first color that should be included in the returned color.
Tom Loudon [Thu, 12 May 2016 21:24:20 +0000 (22:24 +0100)]
Added CanvasPattern global flag for jshint
The core.helpers file was failing linting checks as the global CanvasPattern was not defined. Added the `/* global CanvasGradient */` statement to make linting pass. Updates chartjs/Chart.js#1323
Tom Loudon [Thu, 12 May 2016 21:24:20 +0000 (22:24 +0100)]
Added CanvasPattern global flag for jshint
The core.helpers file was failing linting checks as the global CanvasPattern was not defined. Added the `/* global CanvasGradient */` statement to make linting pass. Updates chartjs/Chart.js#1323
cw0102 [Thu, 12 May 2016 15:56:04 +0000 (11:56 -0400)]
Update 03-Bar-Chart.md
Fix documentation of stacked option to be a subset of the axes rather than a global attribute on a bar chart. The attribute chart was inconsistent with the example below it.
Tom Loudon [Tue, 10 May 2016 16:25:24 +0000 (17:25 +0100)]
Allow pattern hover state in all chart types
Updated all chart types to use the helper.getHoverColor. Pattern fills can now be specified for both fill and line portions of a chart. Updates chartjs/Chart.js#1323
Tarqwyn [Tue, 10 May 2016 14:01:30 +0000 (15:01 +0100)]
Following a Slack conversation tadd new Callback to allow updates to datasets config (ie borderColor) based on results of the calculated scale, A typical use case would be apply a Gradient fill.
On branch feature_New_plugin_interface_afterScaleUpdate
Changes to be committed:
modified: dist/Chart.bundle.js
modified: dist/Chart.bundle.min.js
#On branch feature_New_plugin_interface_afterScaleUpdate
#Changes to be committed:
Tarqwyn [Tue, 10 May 2016 14:01:30 +0000 (15:01 +0100)]
Added new plugin Callback `afterScaleUpdate`
Following a Slack conversation tadd new Callback to allow updates to datasets config (ie borderColor) based on results of the calculated scale, A typical use case would be apply a Gradient fill.
On branch feature_New_plugin_interface_afterScaleUpdate
Changes to be committed:
modified: dist/Chart.bundle.js
modified: dist/Chart.bundle.min.js
Tom Loudon [Sat, 7 May 2016 21:24:00 +0000 (22:24 +0100)]
Added helper to allow a CanvasPattern for hover. Updates chartjs/Chart.js#1323
When a hover background isn't specified in the config for a chart a modified version of the default color is used. If the background color is a CanvasPattern object an error is triggered.
With this change the default background color will no longer be modified if it is a CanvasPattern.