Commit Graph

178 Commits

Author SHA1 Message Date
Evert Timberg
b35b246414 Merge branch 'master' into file-size-reduction 2016-05-08 08:11:16 -04:00
Evert Timberg
4ef5d942e6 Linear scale improvements 2016-05-08 07:55:29 -04:00
Evert Timberg
bc505b1a9d beginAtZero and linear scales with no data should play nice 2016-05-07 16:56:04 -04:00
Evert Timberg
8d88e9c3b7 Fix time scale grid lines 2016-05-06 07:57:28 -04:00
Evert Timberg
38373300ee Improve time scale for zoom and pan
* Improve time scale for zoom and pan
Improve category scale when zoomed

* Fix CI test
2016-05-01 11:40:14 -05:00
Evert Timberg
cb54f30c97 Implement getValueForPixel for category scale 2016-04-30 08:39:18 -04:00
Evert Timberg
6df9b24ecd Merge from feature/pan-support
All tests are passing
2016-04-29 20:03:15 -04:00
Lighnat0r
200abc184b update isDatasetVisible call 2016-04-27 23:18:03 +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
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
Tanner Linsley
da90e2f670 Time scale now compensates for rounded tick units
Closes #2277
2016-04-25 17:48:21 -05:00
Evert Timberg
bbd4364f64 Only use valid label moments 2016-04-24 09:14:21 -04:00
Evert Timberg
c31c90b2e4 Backwards pixel to value API 2016-04-23 13:27:10 -04:00
Evert Timberg
bc90aaa522 Start on pan support 2016-04-21 07:48:47 -04:00
Evert Timberg
1a49872ce4 More prework for zoom/pan 2016-04-17 10:33:38 -04:00
Tanner Linsley
4f60eecc01 Better default tick rotation and tick autoskip settings (#2258)
* Better default tick rotation and tick autoskip settings

* scale.time: Use ctx to measure label, and <= instead of < for unit fitting

* Test Changes

* Passing Tests with new defaults
2016-04-16 17:38:03 -05:00
Evert Timberg
a7fede4f46 Fix jshint error 2016-04-03 09:15:11 -04:00
Evert Timberg
9ee70d6d48 Category scale supports min / max 2016-04-02 23:05:48 -04:00
etimberg
998c6939bf Instead of showing a warning on load, throw an error on create if moment is not defined. 2016-03-16 19:59:20 -04:00
etimberg
21a33f0e41 Better conversion to ticks to make it easier to use callbacks 2016-03-16 19:39:09 -04:00
Evert Timberg
9bcc3ca34c Allow ticks.fixedStepSize or ticks.stepSize options to mean the same thing 2016-03-06 08:56:31 -05:00
Evert Timberg
c3f765857e Fix some time rounding problems 2016-03-05 22:58:34 -05:00
Matthias Winkelmann
b69b388b31 fixed travis built 2016-03-02 14:16:52 +01:00
Matthias Winkelmann
d5f837843e Fixes nnnick/Chart.js#2086 by introducing a new time.parser option with high priority to replace the (deprecated) time.format 2016-03-02 13:53:35 +01:00
Evert Timberg
8d5b3809f6 Fix global font settings 2016-02-28 13:41:17 -05:00
Evert Timberg
b812bcc8a5 Fix #2009 2016-02-27 08:58:27 -05:00
Evert Timberg
309ab1f477 Disable autoskipper for time scales 2016-02-15 09:41:35 -05:00
etimberg
01b88f19df Clean up code climate style issues and formatting. 2016-02-14 17:06:00 -05:00
etimberg
f6951816a0 Improve joshing reporting. Added a JSHint config file.
Fixed JSHint warnings.
2016-02-13 20:12:26 -05:00
Tanner Linsley
813d18bd78 Passing All Tests, Updated Dependencies 2016-02-11 23:16:43 -07:00
Tanner Linsley
007d029837 Bundled builds
Possible usages are:

src/Chart.js (umd)
dist/Chart.js (ChartJS)
dist/Chart.min.js (ChartJS minified)
dist/Chart.bundle.js (ChartJS with Moment.js)
dist/Chart.bundle.min.js (ChartJS with Moment.js minified)
2016-02-11 21:29:26 -07:00
Tanner Linsley
f2780bb825 Browserify for easier UMD consumptions and vanilla builds 2016-02-11 20:30:53 -07:00
Robert Becker
e9c18f603d Merged remote-tracking branch 'upstream/v2.0-dev' into v2.0-dev to fix conflicts.
Refactored linear scale fixed step size implementation.
Added nbproject to .gitignore
2016-02-09 12:56:16 +01:00
Evert Timberg
61ca178e2b Write an almost equals function and use it in the linear scale. Added a test for this new function. 2016-02-06 09:38:44 -05:00
Robert Becker
098b05f1b2 Further reformatted scale.linear.js to match original indenting.
Refactored and fixed scale calculation.
Added dist files to commit.
2016-02-05 09:41:45 +01:00
Robert Becker
85de9fbe9c Further reformatted scale.linear.js to match original indenting. 2016-02-05 09:33:57 +01:00
Robert Becker
80ede9b9bb Added documentation for fixedStepSize.
Reformatted scale.linear.js to match original indenting.
2016-02-05 09:28:50 +01:00
Robert Becker
09721407d2 Removed debug log. 2016-02-04 15:28:06 +01:00
Robert Becker
9a20381af4 Fixed typo in core.helpers.js.
Added ticks.fixedStepSize configuration parameter to force linear scale steps.
2016-02-04 15:20:17 +01:00
Evert Timberg
d16f4fc5ce Add default font options 2016-02-01 21:06:54 -05:00
Evert Timberg
0e8babf1d7 Fix stacked bar data limit calculation 2016-02-01 18:44:39 -05:00
Evert Timberg
172c088c6b Minor fix 2016-01-30 17:19:32 -05:00
Evert Timberg
f75116a91e Update millisecond default format. Removed unnecessary space at right edge of time scale. 2016-01-30 16:35:10 -05:00
Evert Timberg
68ab74a46d Fix linear scale stacked mode 2016-01-24 09:22:28 -05:00
Evert Timberg
c312835eb1 Add some tests for scales. Cleaned up some minor bugs in the time scale. Wrote better helpers for helpers.min and helpers.max 2016-01-23 12:44:55 -05:00
Evert Timberg
1de0435feb Fix reversed ticks on linear scale + update test 2016-01-17 20:37:43 -05:00