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
1a49872ce4
More prework for zoom/pan
2016-04-17 10:33:38 -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
8d5b3809f6
Fix global font settings
2016-02-28 13:41:17 -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
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
0e8babf1d7
Fix stacked bar data limit calculation
2016-02-01 18:44:39 -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
Tore Lervik
a0c359ee80
min/max should have precedence over suggestedMin/suggestedMax
2015-12-25 13:53:09 +01:00
Tore Lervik
3577d959d0
Have to check for undefined because "if (0.0)" would equal false.
2015-12-21 20:28:20 +01:00
Evert Timberg
c8d3831152
Split out data limits step of scales into it's own step. Wire up callbacks from the options to those in the scale life-cycle. Updated the docs accordingly
2015-12-17 09:21:04 -05:00
Evert Timberg
3e3912973c
Slight improvement to new min/max options so that linear scales look right
2015-12-15 18:58:05 -05:00
Mattias Lyckne
968db4e783
Adds min and max setting to axes
2015-12-14 09:22:34 +01:00
Evert Timberg
ead6247cd8
Make sure data is converted to a number in scales when determining min and max. Add tests for this condition to linear, radialLinear, and logarithmic scales.
2015-11-17 18:43:18 -05:00
Evert Timberg
66bc1dc492
Reference data from the main controller wherever possible. Updated tests to account for this.
2015-11-13 09:38:35 -05:00
Pascal Richier
97da3347be
Add options.ticks.maxTicksLimit
...
To be able to change default '11' value
2015-11-07 01:37:09 +01:00
Evert Timberg
4267d01bc2
Log scale + tests
2015-11-01 09:07:18 -05:00
Evert Timberg
8324b35506
Update linear scale + tests
2015-11-01 08:45:12 -05:00
etimberg
3aaa3e27f3
suggestedMin and suggestedMax options for scales
2015-10-31 11:01:40 -04:00
etimberg
988034cef6
Scale expansion if min === max will only occur after ticks.beginAtZero is handled
2015-10-27 20:04:21 -04:00
Tanner Linsley
559ee6291e
Merge pull request #1567 from nnnick/fix/rounding
...
Better linear scale tick formatter + small tick generation
2015-10-24 01:40:43 -06:00
etimberg
0c3d9ec5dd
Improved number format function. Also improved the generation of small tick values
2015-10-23 22:00:59 -04:00
Tanner Linsley
ea571003d9
Scale min/max calculations now disregard bad values
2015-10-23 16:41:11 -06:00
etimberg
2b057cf690
Merge remote-tracking branch 'origin/v2.0-dev' into v2.0-dev-tooltip-refactor
2015-10-18 18:17:39 -04:00
etimberg
7603b3cc36
Time scales now support passing in data as points. Added this to the time scale sample file.
2015-10-18 18:00:46 -04:00
etimberg
180209e55c
Factor out getLabelForIndex
into each scale so we can return appropriate data based on the scale type
2015-10-18 16:13:57 -04:00
Evert Timberg
aaec5efd52
Scales will only consider visible datasets when calculating data max and min values
2015-10-07 19:37:53 -04:00
Evert Timberg
3d1e1b1605
Updated core.scale draw code with minor improvements and features that broke during integration (such as mirror option for labels). Updated linear and logarithmic tests. Update config merge to use scaleMerge since it prevents overriding the default entirely.
2015-09-25 21:04:45 -04:00
Evert Timberg
cf944ae651
Make sure ticks are converted to strings. Handle this in the core. Updated linear scale tests & fixed some minor issues. Only 3 fails now in the linear scale.
2015-09-24 22:08:25 -04:00
Tanner Linsley
4c2027aabb
Horizontal Log Scale
2015-09-24 12:59:03 -06:00
Tanner Linsley
ca48caa8b0
checkpoint for the morning check
...
made some good progress. Just need some more eyes on it, cuz I’m
literally typing without my glasses on right now.
2015-09-24 02:25:21 -06:00
Tanner Linsley
e2a96501b7
Vertical Scales are a bit better now
2015-09-23 23:23:20 -06:00
Tanner Linsley
c7107677d2
Stuck on shared vertical scale draw logic
...
Trying to make all scales share the same draw function for both
horizontal and vertical. For some reason the vertical linear scale on
line.html has a width that is too small
2015-09-23 21:52:31 -06:00
Tanner Linsley
9b9ebca246
Checkpoint 1, Pew!!!!
2015-09-22 19:31:26 -06:00
Evert Timberg
b1060f20ec
Linear scale has labels
2015-09-20 18:59:58 -04:00
Evert Timberg
c8d5856216
Start testing the linear scale fit code
2015-08-30 21:49:39 -04:00