Commit Graph

1754 Commits

Author SHA1 Message Date
Evert Timberg
7aa1463c15 Remove bad tests from linear scale 2016-04-27 21:24:13 -04:00
Evert Timberg
5c146a9da5 Linear scale tests 2016-04-27 21:19:02 -04:00
Evert Timberg
2253e84c47 Numerical improvements to matcher 2016-04-27 19:46:15 -04:00
Evert Timberg
1e066ea5de Minor test fix 2016-04-27 19:04:00 -04:00
Evert Timberg
405fda6655 Fix radar tests & reenable. support new lineTension attribute like line controller 2016-04-27 19:03:52 -04:00
Evert Timberg
40405ebc80 disable time tests for same reason as others 2016-04-27 17:45:39 -04:00
Evert Timberg
34992bc4cb Fix doughnut test 2016-04-27 17:40:56 -04:00
Evert Timberg
6abc9a9020 Merge pull request #2394 from Lighnat0r/master
Update time scale range only for visible datasets
2016-04-27 17:24:23 -04:00
Lighnat0r
200abc184b update isDatasetVisible call 2016-04-27 23:18:03 +02:00
Evert Timberg
03fb66751f Make animation options consistent for polar area and doughnut charts (#2342)
* Make animation options consistent and fix an issue when `animateRotate === false` in the polar area chart

* Update docs for moved options

* Fix typo
2016-04-27 16:07:21 -05:00
Lighnat0r
c5c38de5c3 Merge branch 'master' of https://github.com/Lighnat0r/Chart.js 2016-04-27 22:47:23 +02:00
Lighnat0r
6b32466a19 update time scale range only for visible datasets 2016-04-27 22:46:49 +02:00
Evert Timberg
450a08420b Merge pull request #2371 from chartjs/fix-time-scale-cutoff-bug
Time scale now compensates for rounded tick units
2016-04-27 15:39:02 -04:00
Evert Timberg
7c6a14c371 Merge pull request #2346 from simonbrunel/shared-data
Shared data between charts
2016-04-27 15:38:32 -04:00
Lighnat0r
195cace7c2 update time scale range only for visible datasets 2016-04-27 21:26:20 +02:00
Nick Downie
581eff1415 Merge pull request #2393 from chartjs/docs-version-links
Link to previous version docs
2016-04-27 19:55:06 +01:00
Nick Downie
0447fda26d Update readme to link to previous versions
Note - this removed now not required mention of liquid tags in docs.
2016-04-27 19:49:26 +01:00
Nick Downie
daf04463c0 Link to 1.x documentation in notes 2016-04-27 19:48:05 +01:00
Simon Brunel
eb14481d02 Fix legend tests and disable other failing tests 2016-04-27 19:58:36 +02:00
Evert Timberg
cbb88bea2f Merge pull request #2391 from samdjstevens/master
Fix incorrect default setting in documentation
2016-04-27 08:23:44 -04:00
Sam Stevens
cdf0682e39 change the default setting for Chart.defaults.global.title.display from true to false in the docs to match the code 2016-04-27 12:34:58 +01:00
Evert Timberg
c329167d7f Merge pull request #2387 from chartjs/v2.0-dev
V2.0 dev
2016-04-27 06:50:23 -04:00
Simon Brunel
a93b3f45ac Fix helpers, layoutService and logarithmic tests 2016-04-26 22:44:53 +02:00
Simon Brunel
e0353dac98 Fix bar, bubble, doughnut, and polarArea tests
Also replace the 2 spaces indentation in controller.bar.tests.js by tabs to match the overall code style.
2016-04-26 12:46:34 +02:00
Simon Brunel
8b156bdc98 New toBeCloseToPixel jasmine matcher
Because of differences between testing platforms, introduce a new matcher for (floating) pixel values comparison (currently 2 pixels tolerance).
2016-04-26 12:46:33 +02:00
Simon Brunel
886956441e New test helpers to acquire and release charts
Since we changed the way how meta data are stores, now unit tests need to work on real Chart instances. This commit brings some helpers to inject/cleanup HTML canvas and it's wrapper into/from the DOM.
2016-04-26 12:46:31 +02:00
Simon Brunel
aa0933e040 Avoid meta data access in calculateCircumference
Fix access of uninitialized meta data while calculating circumference in the polar area chart by caching the number of visible elements in the update() method. Also make the calculateTotal() of the doughnut chart tolerant of uninitialized meta data.
2016-04-26 12:46:30 +02:00
Simon Brunel
29115c9d2c Handle data visibility per chart
New Chart.Element.hidden bool flag storing the visibility state of its associated data. Since elements belong to a specific chart, this change allows to manage data visibility per chart (e.g. when clicking the legend of some charts).

This commit also changes (fixes?) the polar chart animation when data visibility changes. Previous implementation was affected by an edge effect due to the use of NaN as hidden implementation.
2016-04-26 12:46:29 +02:00
Simon Brunel
82b1e5cd99 Handle effective dataset visibility per chart
Introduced a new meta.hidden 3 states flag (null|true|false) to be able to override dataset.hidden when interacting with the chart (i.e., true or false to ignore the dataset.hidden value). This is required in order to be able to correctly share dataset.hidden between multiple charts.

For example: 2 charts are sharing the same data and dataset.hidden is initially false: the dataset will be displayed on both charts because meta.hidden is null. If the user clicks the legend of the first chart, meta.hidden is changed to true and the dataset is only hidden on the first chart. If dataset.hidden changes, only the second chart will have the dataset visibility updated and that until the user click again on the first chart legend, switching the meta.hidden to null.
2016-04-26 12:46:27 +02:00
Simon Brunel
f3457c9941 Handle dataset type per chart
Dataset effective type is now stored under meta.type, allowing many charts to share the same dataset but with different types. Also move dataset.bar flag to meta.bar.
2016-04-26 12:46:26 +02:00
Simon Brunel
51aa9b4a27 Allow multiple charts sharing the same data
Meta info are now scoped by chart and moved under the dataset._meta map { chart.id -> meta }. Meta for a specific chart (and dataset) can be accessed using chart.getDatasetMeta(datasetIndex) or from the dataset controller using getMeta(). Note that helpers.uid() now generates an int (instead of a string) to make lookups in the _meta map faster.
2016-04-26 12:46:24 +02:00
Evert Timberg
b615fe8c35 Merge pull request #2376 from DaanDeMeyer/fix_scale_default_position
Added default ("left") for position field in global scale defaults (fixes #2370)
2016-04-25 21:37:05 -04:00
Daan De Meyer
73493e2c9e Added default ("left") for position field in global scale defaults.
Documented scale position field in scale docs.
2016-04-26 03:09:35 +02:00
Evert Timberg
61b30f8edf Merge pull request #2375 from DaanDeMeyer/documentation_fixes
Removed scale option from pie/doughnut docs (not used)
2016-04-25 20:58:58 -04:00
Daan De Meyer
bb29401a0e Removed scale option from pie/doughnut docs (not used)
Changed usages of tension in global element options and radar chart options to lineTension
2016-04-26 02:54:16 +02:00
Evert Timberg
27030b7cae Merge pull request #2372 from DaanDeMeyer/documentation-fixes
-- Replaced '-' and 'Array' with 'Object' where appropriate (fixes #2367)
2016-04-25 20:20:41 -04:00
Daan De Meyer
768a3d1e9c -- Replaced '-' and 'Array' with 'Object' where appropriate
-- Removed unnecessary options from bar chart options
2016-04-26 01:59:11 +02:00
Tanner Linsley
da90e2f670 Time scale now compensates for rounded tick units
Closes #2277
2016-04-25 17:48:21 -05:00
Evert Timberg
b28f8d2fb1 Merge pull request #2368 from DaanDeMeyer/documentation-fixes
Radar chart docs fix
2016-04-25 18:30:58 -04:00
Daan De Meyer
61cef17f11 -- Removed linebreak added with previous fix 2016-04-26 00:28:02 +02:00
Daan De Meyer
b9eef5453a -- tension option should be lineTension 2016-04-26 00:09:41 +02:00
Evert Timberg
6ac01e0b5f Merge pull request #2359 from zachpanz88/patch-1
Fix link address
2016-04-25 13:58:57 -04:00
Evert Timberg
129ca591e6 Merge pull request #2360 from vincchan/fix-anchor
Fixes anchor link in docs
2016-04-25 13:58:50 -04:00
Zach Panzarino
0420965b49 Update gulpfile.js 2016-04-25 13:18:25 -04:00
Vincent Chan
d0b5bb941d Fixes anchor link in docs 2016-04-25 19:17:47 +02:00
Evert Timberg
7916b84826 Merge pull request #2356 from zachpanz88/patch-1
Fix url address
2016-04-25 11:47:36 -04:00
Evert Timberg
f801eec3cd Merge pull request #2353 from vincchan/fix-caniuse-link
Fixes broken link in the docs
2016-04-25 11:47:11 -04:00
Zach Panzarino
8d6ea1fde9 Update package.json 2016-04-25 11:13:50 -04:00
Vincent Chan
e6e03c29a3 fixes #2351 2016-04-25 16:47:36 +02:00
Jake
c041ee2c7a Merge pull request #2352 from zachpanz88/patch-1
Fix old broken links and update for new repo
2016-04-25 09:22:39 -04:00