Simon Brunel [Fri, 10 Jun 2016 22:14:27 +0000 (00:14 +0200)]
New datasets update plugin extensions
Add `beforeDatasetsUpdate` and `afterDatasetsUpdate` plugin notifications during the chart update. Plugins are able to cancel the datasets update by explicitly returning false to `beforeDatasetsUpdate`. For consistency, rename `(before|after)DatasetDraw` to `(before|after)DatasetsDraw`.
Simon Brunel [Fri, 10 Jun 2016 20:27:06 +0000 (22:27 +0200)]
Allow to register/unregister an array of plugins
The plugins service now accepts an array of plugin instances to register or unregister (for consistency, renamed `Chart.plugins.remove` to `unregister`). Also added a few methods to manipulate registered plugins, such as `count`, `getAll` and `clear` (mainly used by our unit tests).
Simon Brunel [Fri, 10 Jun 2016 20:26:55 +0000 (22:26 +0200)]
Enhance plugin notification system
Change the plugin notification behavior: this method now returns false as soon as a plugin *explicitly* returns false, else returns true. Also, plugins are now called in their own scope (so remove the never used `scope` parameter).
Simon Brunel [Fri, 10 Jun 2016 20:26:35 +0000 (22:26 +0200)]
Rename plugin service and notification method
Rename `Chart.pluginService` to `Chart.plugins` (so move the old Chart.plugins array as a private member of the service), and rename `notifyPlugins` to `notify` for consistency with other service methods.
Jack Valentine [Wed, 8 Jun 2016 15:04:20 +0000 (00:04 +0900)]
ChartJS tooltip fontColor fix
fixed global variable name fix
callback variable name fix
- 'titleColor' to 'titleFontColor'
- 'bodyColor' to 'bodyFontColor'
- 'footerColor' to 'footerFontColor'
문승찬 [Wed, 8 Jun 2016 01:22:47 +0000 (10:22 +0900)]
Fix tooltip core test case
Change tooltip font color options
this options changed in tooltip core
bodyColor -> bodyFontColor
titleColor -> titleFontColor
footerColor -> footerFontColor
Ryan M. Poe [Tue, 7 Jun 2016 07:15:26 +0000 (03:15 -0400)]
Refactor spanGaps for line graphs with sparse data (#2721)
Fix #2435, this very slim patch (including its relevant documentation addition) adds a small option to line chart datasets (spanGaps) that allows users trying to graph sparse datasets to have lines between null entries drawn, rather than omitted.
Simon Brunel [Sun, 5 Jun 2016 20:40:29 +0000 (22:40 +0200)]
Rewrite a few helpers to be more efficient
Resolve at definition time if a browser built-in method or our polyfill should be used, so avoid checking it for each call. Also, `helpers.extend` doesn't need to iterate two times on the function arguments. Finally, remove helpers never referenced.
zachpanz88 [Sat, 4 Jun 2016 18:14:16 +0000 (14:14 -0400)]
Change this -> me in source files
This change allows for smaller minified code in the final version, resulting in a smaller file size. Some files had previously used _this, but that has been changed to me to keep consistency throughout the project.
Tarqwyn [Fri, 3 Jun 2016 16:01:52 +0000 (17:01 +0100)]
This PR allows for multi-line labels, as per Slack discussion..
Usage: If a label is an `array` as opposed to a `string` i.e. `[["June","2015"], "July"]` then each element is treated as a seperate line. The appropriate calculations are made to determine the correct height and width, and rotation is still supported.
view samples/line-multiline-labels.html to see it working.
On branch multiline_labels
Changes to be committed:
modified: docs/03-Line-Chart.md
new file: samples/line-multiline-labels.html
modified: src/core/core.helpers.js
modified: src/core/core.scale.js
Evert Timberg [Fri, 27 May 2016 00:02:46 +0000 (20:02 -0400)]
Line points need always need to pivot after regardless of whether or not bezier points are updated. Bezier points should only be updated if the line tension is not 0.
Simon Brunel [Tue, 24 May 2016 22:04:59 +0000 (00:04 +0200)]
Fix #2418 Firefox old version compatibility
Old versions of FF doesn't accept accessing the computed style via the 'max-width' and 'max-height' CSS notations using brackets, in which case the returned value is undefined. Changed the constraint methods to use maxWidth and mawHeight instead and make sure to test valid values.