Fix bar and line controllers to convert strings to numbers when considering the values for stacking the chart. Simplified the base calculation for the bar charts and added test coverage to ensure that strings will work correctly.
André Wallat [Thu, 16 Jun 2016 11:20:54 +0000 (13:20 +0200)]
Fix tooltip not shown for missing dataset
When two datasets are shown and they don't have the same x-coordinates, then the position of the tooltip is not calculated correctly, when using mode 'label' or 'dataset'. This fix checks if the position of every dataset exists, before it is used.
Simon Brunel [Sun, 15 May 2016 21:32:05 +0000 (23:32 +0200)]
Make Travis to release the npm package
Add .npmignore to include dist/*.js files to the npm release (but exclude zip files). See https://docs.travis-ci.com/user/deployment/npm/. Also cleanup the .gitignore file.
Simon Brunel [Sat, 14 May 2016 23:19:57 +0000 (01:19 +0200)]
New Chart.js.zip package
Samples need to be packaged with built libraries (which one have been removed from the repository), so create a new `gulp package` task to generate a ZIP archive with dist files, samples and the license file. This archive is generated in the ./dist/ folder and will be deployed by Travis along the GH release. Note that the ./dist/ folder is not preserved but merged in the archive root. Also change samples requiring moment.js to load this lib from the CDN instead of the ./node_module folder.
Simon Brunel [Sat, 14 May 2016 21:12:46 +0000 (23:12 +0200)]
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 [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.