Commit Graph

2125 Commits

Author SHA1 Message Date
Zach Panzarino
88c69f5f8c Move reverse option for labels to correct section in docs
Addresses comment in #3102
2016-09-23 00:12:40 +00:00
Simon Brunel
eea51e8678 Bump version to 2.3.0 2016-09-22 20:53:26 +02:00
Nick Downie
631b54522c Ensure the second pie chart sits inline 2016-09-21 11:17:17 +01:00
Simon Brunel
4da47a8430 Bump version to 2.3.0-rc.1 2016-09-17 11:42:28 +02:00
Simon Brunel
d9f6e6d0c5 Change bower package name for chart.js (#1562)
Thanks to the Bower team, we have been able to register the chart.js package name, previously pointing on a dead repository, which make the Bower integration more consistent with the npm one. All other alias still work (Chart.js, chartjs, Chart-js, chartjs-Chart.js).
2016-09-17 11:40:26 +02:00
Zach Panzarino
56845d3cbb Merge pull request #3315 from zachpanz88/fix-pie-multi-dataset
Fix error where pie/doughnut charts did not render correctly with multiple datasets
2016-09-15 23:19:47 -04:00
Zach Panzarino
051f5b015b Fix bug with pie/doughnut chart legends
Fixes a rendering issue when there are multiple datasets on a pie chart and they do not all contain the same number of data in their datasets
Fixes #3309
2016-09-16 01:29:01 +00:00
Evert Timberg
b5544d1a1b Merge pull request #3287 from simonbrunel/tests-cleanup
Tests cleanup
2016-09-15 18:12:34 -04:00
Simon Brunel
5c5b1bfe59 Turn off linebreak-style linting rule
On Windows, this rule conflicts when running ESLint locally on a repository setup with autoCrlf (then all lines are errors).
2016-09-15 23:10:03 +02:00
Simon Brunel
8e37a11e39 Merge pull request #3308 from zachpanz88/eslint
ESLint Updates
2016-09-15 18:01:19 +02:00
Zach Panzarino
8207027743 Implement eslint changes proposed by @simonbrunel in code review 2016-09-15 12:49:11 +00:00
Zach Panzarino
a929fd473e Include changes suggested by @etimberg in code review 2016-09-15 01:21:45 +00:00
Zach Panzarino
8bc280e185 Allow variable use before define with warning 2016-09-15 00:27:29 +00:00
Zach Panzarino
bddd4cd94b Fix style issues in core and scales 2016-09-15 00:23:30 +00:00
Zach Panzarino
dd8fa78b45 Fix more style errors in controllers, elements, and scales 2016-09-14 22:34:41 +00:00
Zach Panzarino
9bf2e2bf7a Remove func-call-spacing rule 2016-09-14 18:16:21 +00:00
Zach Panzarino
11739234a4 Add keyword spacing to eslint and update code 2016-09-14 18:12:23 +00:00
Zach Panzarino
2d2f475a7a First round of eslint fixes 2016-09-14 18:05:19 +00:00
Zach Panzarino
f6eb675470 Update new eslint rules 2016-09-14 18:03:55 +00:00
Zach Panzarino
894b9928e7 Fix broken links in Maintaining.md 2016-09-12 23:21:40 -04:00
Evert Timberg
d8b13ca4ab Merge pull request #3261 from desowin/3211
Implement moment diff cache in time scale
2016-09-12 19:37:50 -04:00
Tomasz Moń
0514ed4793 Fix check for undefined
Use '!==' instead of '!='. This fixes eqeqeq error reported by gulp-eslint.
2016-09-12 10:41:27 +03:00
Evert Timberg
1c831230e3 Merge pull request #3284 from chartjs/fix/3278
Return correct tooltip data in category scale when double category scale is used
2016-09-11 07:46:06 -04:00
Evert Timberg
eb5bca6a4a When the category scale is used as the non main scale, return the correct data for the tooltip 2016-09-09 21:03:59 -04:00
Chris Fä
eb15ddfd2b Cleanup React extension links (#3282)
Remove the existing link which was for Chart.js v1 and add 2 links for Chart.js v2
2016-09-09 23:17:31 +02:00
Evert Timberg
90b56efab0 Merge pull request #3280 from trantorLiu/master
Update 01-Chart-Configuration.md
2016-09-08 19:26:55 -04:00
Chun-Yi Liu
a4bf786c2c Update 01-Chart-Configuration.md
Fix an anchor link.
2016-09-08 18:23:31 -05:00
Simon Brunel
4901471445 Automatically expose custom Jasmine matchers 2016-09-08 23:32:47 +02:00
Simon Brunel
8254331eef Fix time scale tests using the wrong chart instance
Some tests were using the removed global `chartInstance` variable, so tests values were incorrect since against the wrong chart instance.
2016-09-08 23:32:45 +02:00
Simon Brunel
efb82d93d8 Auto-release charts if not persistent (tests)
For convenience, charts are now automatically released after each spec if they are not acquired using `persistent: true`. Also remove the confusing and error prone `chartInstance` global variable and make sure that chart instances are local to each spec.
2016-09-08 23:32:43 +02:00
Lubomir Sotirov
38f85c98b5 Fix 3267 Add "onHover" functionality for legend (#3271)
Add "onHover" to the legend options that will hold a user defined function (default is null) and called when a "mousemove" event is registered on top of a label item, with same parameters as the "onClick" option.

Also introduced logic that determines if the type of event passed to the legend "handleEvent" function is one we can handle. Currently allowing "click" and "mousemove" events. If the event is not one of those we stop the function execution (this is for the sake of reusing the legend hitbox calculations).
2016-09-08 14:42:42 +02:00
Simon Brunel
52cdff5fc1 Merge pull request #3254 from ianks/minDisplayFormat
Suport minUnit for time scale
2016-09-08 13:34:53 +02:00
Evert Timberg
7dcbde48f9 Merge pull request #3256 from simonbrunel/code-cleanup
ESLint and cleanup
2016-09-06 15:21:24 -04:00
Ian Ker-Seymer
7af6e7f192
Suport minUnit for time scale
When dealing with time-delineated datasets, often we have data for known
intervals of time. For example, we may have a dataset which represents number
of purchases per day:

```json
{
	labels: ['2016-01-01', '2016-01-02', '2016-01-03']
	datasets: [
		{
			data: [12, 87, 42]
		}
	],
	'...': '...'
}
```

In this case, Chart.js will attempt to figure out the best interval to display
the data, and could pick `hours` as the unit. However, in this case, we would
prefer to just use the `days` interval since our data's granularity can not be
represented well with `hours`.

To remedy this, this commit adds the `minUnit` option which allows
users to (optionally) specify what the minimum unit they would like
to use.
2016-09-06 13:11:06 -04:00
Tomasz Moń
cd24895cd1 Build labelDiffs cache once per update (#3211)
Previously buildLabelDiffs() was called at the end of buildTicks() and
hence labelDiffs cache was calculated twice (in getMinimumBoxSize() and
then in fitBox()).
2016-09-04 10:22:27 +03:00
Tomasz Moń
020ac35852 Build label diff lookup table
This reduces number of calls to momentjs diff() if there are multiple
datasets sharing the same labels (#3211).
2016-09-03 22:30:05 +03:00
Simon Brunel
7c93255b16 Enforce curly braces for single statement block
curly: [error, all] (http://eslint.org/docs/rules/curly)
2016-09-03 18:42:28 +02:00
Simon Brunel
3d40774c7d Enforce consistent tab indentation
indent: [error, tab] (http://eslint.org/docs/rules/indent)
2016-09-03 18:42:26 +02:00
Simon Brunel
69ab0d3e23 Use gulp-eslint instead of gulp-jshint
Change the linter in gulp tasks to be consistent with Code Climate results which are based on ESLint using .eslintrc options. However, defaults Code Climate rules are too strict, so turn as warnings the 'complexity' and 'max-statements' rules (other errors has been fixed). Note that the Gulp task name has been changed for `gulp lint`.
2016-09-03 18:42:22 +02:00
Simon Brunel
1f67e54d79 Remove unused npm packages 2016-09-03 18:09:57 +02:00
courchef
6269e2c437 Error possible when using the plugin Chart.Zoom.js used with time scale (#3194)
Zooming in can cause the params `datasetIndex` and `index` to be null in method `getLabelMoment`. This happens when no ticks are visible on scale. It also throws an error and the chart becomes broken.
2016-09-03 18:06:09 +02:00
Simon Brunel
4cbff0278e Merge pull request #3223 from simonbrunel/bower_release
Deploy dist files in release tags (bower support)
2016-09-03 18:02:38 +02:00
Evert Timberg
2268bef321 Merge pull request #3242 from Pikamander2/new_branch
Fix zero border width not working (issue #3241)
2016-09-02 18:46:16 -04:00
Ekaterina Dontsova
6408ba426c Fix #3022 Multi-lines label alignment (#3239) 2016-09-03 00:26:02 +02:00
Zach Panzarino
a42f3e786e Update link to slack automation in Contributing.md 2016-09-01 15:20:18 +00:00
Pikamander2
f3c51fc624 Fix zero border width not working (issue #3241) 2016-09-01 02:28:10 -04:00
Pikamander2
2002ca058b Fix zero border width not working (issue #3241) 2016-09-01 02:18:42 -04:00
Tanner Linsley
e35df050fb Update README.md 2016-08-30 09:04:16 -06:00
Simon Brunel
594605c5c4 Remove deprecated gulp tasks and dependencies 2016-08-30 00:04:40 +02:00
Simon Brunel
6d5638e415 Describe the release process 2016-08-30 00:04:39 +02:00