Evert Timberg
8e3ba9d88e
Update tooltip colour draw code
2015-11-13 08:20:39 -05:00
Evert Timberg
14b6fdd51e
Bail out, same as the x axis
2015-11-11 21:40:29 -05:00
Evert Timberg
3099d967da
Do not bind to touchend events. This is the same as v1.x
2015-11-11 21:21:25 -05:00
Pascoual
234efc5267
Fix: tooltips checks indent
2015-11-10 01:00:30 +01:00
Pascoual
c4d02a8f96
Fix: no tooltips when missing data for one or more dataset
2015-11-10 00:53:08 +01:00
Pascal Richier
d5d63070c6
Add options.ticks.maxTicksLimit
...
To be able to change default '11' value
2015-11-07 01:39:30 +01: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
d6252df4cd
Merge pull request #1601 from nnnick/fix/stacked-bar-line-scale
...
Fixed stacked scale calculation for combo charts
2015-11-03 18:14:37 -05:00
Derek Perkins
29c3bd3746
Merge pull request #1603 from nnnick/fix-tooltips
...
Only call custom tooltips when elements have changed. But be sure to call update internally any time that tooltips need to be redrawn.
2015-11-01 22:52:46 -07:00
Tanner Linsley
b0380d4ede
Check if dataset is visible when adding active elements to a tooltip
2015-11-01 22:50:16 -07:00
Tanner Linsley
28bc80e439
ElementsAtLabel now returns all datasets' elements at the found index
2015-11-01 22:44:31 -07:00
Tanner Linsley
d46524aedc
Tooltip's label mode now uses average position of all points
2015-11-01 22:43:44 -07:00
Evert Timberg
2c04a816d7
Use correct option to detect stacked mode along x axis.
2015-11-01 20:26:58 -05:00
Tanner Linsley
f4a5a30451
Only call custom tooltips when elements have changed. But be sure to call update internally any time that tooltips need to be redrawn.
2015-11-01 13:56:36 -07: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
Derek Perkins
b823bae63e
Merge pull request #1600 from nnnick/fix-line-stacked-area
...
Fix line stacked area
2015-10-31 22:48:29 -06:00
Tanner Linsley
334ba44e95
Allow line controller to calculate stacked values
2015-10-31 22:45:25 -06:00
Evert Timberg
cf587122da
Merge pull request #1586 from nnnick/fix/begin-at-zero-issue-with-constant-data
...
Scale expansion if min === max will only occur after ticks.beginAtZero is handled
2015-10-31 20:23:57 -04:00
Tanner Linsley
93a923d38f
Remove logs
2015-10-31 18:17:42 -06:00
Tanner Linsley
22aabdbfab
Update tooltip only when things change (which will only trigger customTooltips when model changes)
2015-10-31 18:17:32 -06:00
Tanner Linsley
5ba1ec0d3b
More concise change detection
2015-10-31 18:17:06 -06:00
Tanner Linsley
8398d26d10
Remove Tooltip opacity from core-controller
2015-10-31 18:16:35 -06:00
Tanner Linsley
fa33f3158e
Don't kill lastActives on chart hover exit
2015-10-31 18:15:58 -06:00
Tanner Linsley
0fa03fad24
Handle opacity in the tooltip update method
2015-10-31 18:14:56 -06:00
Tanner Linsley
be50c63e72
commas to pass jshint
2015-10-31 16:09:11 -06:00
Tanner Linsley
ecf5801787
call the custom callback in tooltip options
2015-10-31 16:07:57 -06:00
Tanner Linsley
753fd79bf3
Call tooltip update even when tooltip has no active elements
2015-10-31 16:07:36 -06:00
etimberg
3aaa3e27f3
suggestedMin and suggestedMax options for scales
2015-10-31 11:01:40 -04:00
etimberg
c316f90999
Polar area tooltip improvements
2015-10-30 21:04:45 -04:00
etimberg
b8e57144cc
Doughnut chart tooltips work
2015-10-30 20:48:31 -04:00
etimberg
1017934dce
tooltips for radar charts are working
2015-10-30 20:35:36 -04:00
etimberg
6716dbb7e5
Fix up arguments to tooltip callbacks. Simplified code in some places and removed old code.
2015-10-30 20:12:05 -04:00
etimberg
9bebedd967
Play around with tooltip to see if a better API is possible. No longer crashes for polar area / doughnut / radar charts
2015-10-28 22:52:43 -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
872b7b6161
Legend now centers labels and draws their box colors/styles
2015-10-27 02:34:23 -06:00
Tanner Linsley
ab2c3ce4e9
Linear Scale now plays nice with full width
2015-10-27 02:33:45 -06:00
Tanner Linsley
2bc386ee81
Category Scale now plays nice with full width
2015-10-27 02:33:34 -06:00
Tanner Linsley
15ff3f9edc
Core Scale now plays nice with layoutService and full width
2015-10-27 02:33:19 -06:00
Tanner Linsley
9ab505caec
Layout Service readability & reorganization
...
The layout service now treats all horizontal boxes as full width.
Scales are expected to use the margins to know where to line up with
the chartArea.
2015-10-27 02:32:55 -06:00
Tanner Linsley
74c04a354a
Do not draw line up on first point of line
2015-10-26 19:24:48 -06:00
Tanner Linsley
a91dba3e8a
50% Canvas Legend Support
2015-10-26 13:57:59 -06: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
Tanner Linsley
2cd4b13135
radialLInear getPointPosition now rounds crazy decimals
...
This particular part of testing was succeeding in chrome, and failing
in firefox. It should be rounded anyway.
2015-10-24 01:23:13 -06:00
Tanner Linsley
1c40d50097
recursive and accurate getRightValue
2015-10-24 01:22:12 -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
Tanner Linsley
e50d2f7fc3
Point Skipping now draws properly and is easier to understand
2015-10-23 16:37:34 -06:00
Tanner Linsley
7b13e902ff
Bad values for data are now converted to NaN
2015-10-23 16:36:59 -06:00
Tanner Linsley
9d540cebb6
SplineCurve function now graciously handles skipped points
2015-10-23 16:36:33 -06:00
Tanner Linsley
afc40e7dbc
Radar controller now skips non-numerical coordinates
2015-10-23 16:36:00 -06:00
Tanner Linsley
ae0d9b0c68
Line controller now skips non-numerical coordinates
2015-10-23 16:35:52 -06:00
Tanner Linsley
8081e9c801
Bubble controller now skips on non-numerical coordinates
2015-10-23 16:34:40 -06:00
Tanner Linsley
3a20d1187e
Merge pull request #1542 from nnnick/v2.0-dev-tooltip-refactor
...
V2.0 dev tooltip refactor
2015-10-23 13:02:57 -06:00
Tanner Linsley
60f2426774
Only use active datasets in the tooltip body
2015-10-23 12:41:21 -06:00
Tanner Linsley
bc41909e7a
Track lastTooltipActive for change animations
...
Since we split up the hover and tooltips modes, both changes need to be
tracked for visual updates between the two.
2015-10-23 12:41:21 -06:00
Ryan Mitchell
57979a2270
Fix similar typos in core.controller & element
2015-10-22 12:47:45 -04:00
Ryan Mitchell
ef1c4fb0cb
Fix typo in core.helpers.js
2015-10-22 12:41:03 -04:00
etimberg
24e8fe3a4b
Merge remote-tracking branch 'origin/v2.0-dev' into v2.0-dev-tooltip-refactor
2015-10-21 20:18:23 -04:00
etimberg
e46a2cb074
Fix JSHint errors
2015-10-20 20:33:51 -04:00
Tanner Linsley
35011e5ae3
Support min and max dates on time scale
2015-10-19 21:23:01 -06:00
etimberg
bfabac945f
Labels are now optional for the time scale.
2015-10-19 19:20:08 -04:00
Evert Timberg
86a52d0302
Fix some test failures
2015-10-18 19:34:56 -04: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
082391e385
Update docs a bit for new items. Small updates for tooltip labels.
2015-10-18 18:14:56 -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
ceaa4ff03f
Add a helper function to reduce code size
2015-10-18 16:31:18 -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
etimberg
f650445ddc
Use correct function to get afterBody
lines for tooltip.
2015-10-18 10:39:54 -04:00
Tanner Linsley
19a7c57e2f
All tooltip callbacks support arrays for lines, and no drawing invisible tooltips.
...
Simply return a string for a single line tooltip, or return an array to
create multiple lines.
2015-10-17 15:53:33 -06:00
Evert Timberg
9526c77675
Merge pull request #1512 from nnnick/v2.0-dev-bubble-controller
...
Bubble Chart Type and Bubble Controller
2015-10-17 08:46:44 -04:00
Tanner Linsley
e0918817ae
Testing fixes for time scale
2015-10-16 21:14:07 -06:00
etimberg
3699addf16
Use the correct font for the ticks. Ensure that scale labels fill in the correct colour.
2015-10-16 22:00:43 -04:00
Lucas Styles
4a48e19cac
Fix HTMLIframeElement remove/removeNode issue in removeResizeListener method
2015-10-17 00:35:47 +01:00
Tanner Linsley
6c4c4695d9
Merge pull request #1526 from etimberg/fix/responsive-config-setting
...
Use the correct merged responsive setting in the resize listener
2015-10-13 11:46:14 -06:00
Evert Timberg
e39298db3c
Before labels can rotate, we need the appropriate left, right, top, & bottom attributes of the scale set with default values so that tick spacing can be determined. After ensuring that this happens, tests needed to be updated. Added unit testing for the scale service.
2015-10-13 11:43:00 -04:00
Tanner Linsley
b835d5f209
Tooltip Hooks
2015-10-12 14:51:00 -06:00
Evert Timberg
93ee8f85f6
Put comment back in correct spot
2015-10-12 09:19:14 -04:00
Evert Timberg
1232ca53f0
Fix a race condition in the resize listener & use the correct merged config object for the responsive setting
2015-10-12 09:16:49 -04:00
Evert Timberg
a756e0de15
Only merge scale defaults with the global scale defaults when getting the scale defaults. Otherwise, the user does not have the ability to change them via the global settings since registration occurs when the library is loaded.
2015-10-12 08:58:03 -04:00
Evert Timberg
b36c8ff788
Update controllers to handle datasets that are not visible
2015-10-07 19:54:11 -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
22e7934804
Helper to determine if a dataset is visible or not
2015-10-07 19:10:10 -04:00
Tanner Linsley
ef5cec7f5e
Tooltips now using new lineArray format
2015-10-06 20:40:25 -06:00
Tanner Linsley
65f9ee8a4a
Bubble Chart Type and Bubble Controller
2015-10-05 12:40:28 -06:00
Tanner Linsley
e24406fc9d
Ensure tickUnit and displayFormat set before format loop
2015-09-29 10:54:42 -06:00
Tanner Linsley
1bdf5edc24
Time Scale now requires and warns for Moment.js dep
2015-09-28 11:27:47 -06:00
Evert Timberg
77faacb467
Removed the line scale override file since functionality no longer directly exists. Updated the core scale drawing with tighter padding & better drawing when on top. Updated tests
2015-09-27 21:34:16 -04:00
Evert Timberg
bc7d1d39fd
Convert the radialLinear scale to derive from Core.scale. Radial linear scale is now fit using the scale service. Added tests for the radialLinear scale.
2015-09-27 11:58:20 -04:00
Evert Timberg
be4facdea9
Time scale tests.
2015-09-27 09:38:11 -04:00
Evert Timberg
5156e633ca
Category scale tests
2015-09-26 16:52:14 -04:00
Evert Timberg
68f563fba4
Merge branch 'v2.0-dev-refactor' of https://github.com/nnnick/Chart.js into v2.0-dev-refactor
2015-09-25 21:04:57 -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
Tanner Linsley
b8d8ff8bae
I guess, don't include the offset. Bars now align correctly.
2015-09-24 22:49:43 -06: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
Evert Timberg
f1b704a419
Fix scale fitting to give padding around the scale title & to account for label rotation
2015-09-24 18:53:48 -04:00
Tanner Linsley
505e6d780e
Always includeOffset for bar controller
2015-09-24 15:46:10 -06:00
Tanner Linsley
7372987754
Add scaleLabel to core.scale
2015-09-24 15:45:56 -06:00
Tanner Linsley
b22f569e4d
Merge branch 'v2.0-dev' into v2.0-dev-refactor
...
Conflicts:
samples/line-scale-override.html
samples/line-x-axis-filter.html
samples/line.html
src/controllers/controller.bar.js
src/core/core.controller.js
src/scales/scale.category.js
2015-09-24 14:34:26 -06:00
Tanner Linsley
1f0ee92992
Polar Area now uses new scale.update method
2015-09-24 13:07:32 -06:00
Tanner Linsley
4c2027aabb
Horizontal Log Scale
2015-09-24 12:59:03 -06:00
Tanner Linsley
440703efff
Log Scale Working Again
2015-09-24 12:31:18 -06:00
Tanner Linsley
d198157fb8
Time Scale working, troubleshooting log scale
2015-09-24 12:07:40 -06:00
Ben Woodford
b0679a80ae
Fixed label padding not affecting x-axis label
2015-09-24 16:02:58 +01:00
Ben Woodford
d7ab51f29b
Only rotate label while rotation is < maxRotation
...
Checking for <= maxRotation results in a labelRotation of 1 if maxRotation is 0, which doesn't make any sense (and also causes the text to be right aligned not centred)
2015-09-24 15:54:10 +01: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
4a093196b8
Don't increase canvas css size during a retina scale. Reset the canvas style exactly as it was set before during destroy. Ensure coordinates are translated over correctly into model coordinates. Fixed a bug during destroy when unscaling the canvas
2015-09-22 19:22:55 -04:00
Evert Timberg
416a6ac1bd
Remove unneeded functions from core controller. Updated dataset controllers to have a separate function to update the meta data for each dataset
2015-09-21 20:59:53 -04:00
Tanner Linsley
301efac8dd
Merge pull request #1477 from etimberg/feature/scale-labels
...
Scale Labels
2015-09-21 17:52:09 -06:00
Tanner Linsley
8c94ae0441
Ensure bar width at least 1px
2015-09-21 13:17:27 -06:00
Tanner Linsley
01fdd387d9
Merge pull request #1474 from nnnick/v2.0-feature-dynamic-bar-spacing
...
Bar spacing is now dynamic at small sizes.
2015-09-21 13:08:09 -06:00
Tanner Linsley
e3e66d2425
Time scale support
2015-09-21 13:04:41 -06:00
Tanner Linsley
154083b875
Bar spacing is now dynamic at small sizes.
...
Closes #1468
2015-09-21 12:57:04 -06:00
Tanner Linsley
2a76ff0037
Time scale now draws all ticks, instead of half of them
...
Closes #1463
2015-09-21 11:52:17 -06:00
Tanner Linsley
848710b447
Merge pull request #1471 from etimberg/fix/mouse-coordinates
...
Convert screen coordinates into canvas coordinates when dealing with mouse events
2015-09-21 11:37:21 -06:00
Evert Timberg
f4cdd20a38
Time scale has a label now
2015-09-20 19:24:46 -04:00
Evert Timberg
b7c7f1d6a4
Category scale has labels
2015-09-20 19:18:59 -04:00
Evert Timberg
2667807c1d
Logarithmic scale now has labels
2015-09-20 19:06:09 -04:00
Evert Timberg
b1060f20ec
Linear scale has labels
2015-09-20 18:59:58 -04:00
Evert Timberg
162aaa993a
Convert screen coordinates into canvas coordinates when dealing with mouse events
2015-09-20 17:57:27 -04:00
Evert Timberg
17cec5297d
Update charts with default aspect ratio of 1 where it makes sense. If the canvas has no size specified, this will be used
2015-09-20 10:34:40 -04:00
Evert Timberg
8aa6288210
Ensure that radii are always >= 0 for doughnuts and polar area charts
2015-09-20 10:33:36 -04:00
Evert Timberg
8bddbff9aa
Prevent a jump in the category scale when the labels need to rotate only when there is no margin yet applied.
2015-09-20 10:32:43 -04:00
Evert Timberg
814c2d7ffa
Remove responsive file since it is not necessary
2015-09-20 10:30:43 -04:00
Evert Timberg
39252d4633
Use hidden iframe to detect resize + obey max width when getting maximum size. Updated the bar sample to start off hidden. Use the 'show' button to display the graph
2015-09-20 10:30:12 -04:00
Evert Timberg
9474d72491
Revert "Fix resize problems when charts are initially hidden"
2015-09-19 17:52:58 -04:00
Tanner Linsley
862045e49a
Merge pull request #1465 from nnnick/v2.0-dev-time-scale-bars-and-combo
...
Bar and combo support for time scale
2015-09-18 18:59:58 -06:00
Evert Timberg
97cec8604a
Only store the original device context ratio once
2015-09-18 19:22:54 -04:00
Evert Timberg
8d47693448
Make sure that doughnut and polar area inner & outer radius is >= 0
2015-09-18 18:59:55 -04:00
Evert Timberg
db5066cd23
Remove core.responsive file. Responsiveness is added during initialization
2015-09-18 18:44:00 -04:00
Evert Timberg
bcbd9a85e6
Merge remote-tracking branch 'upstream/v2.0-dev' into feature/resize_problems
...
Conflicts:
gulpfile.js
2015-09-18 18:38:47 -04:00
Tanner Linsley
677c249b61
Bar and combo support for time scale
2015-09-18 11:31:25 -06:00
Evert Timberg
723c85320f
Unit tests for logarithmic scale. Fixed some issues in stacked mode since it's not possible for a 0 crossing to occur with a log scale.
2015-09-17 20:29:41 -04:00
Tanner Linsley
92682abbae
Merge pull request #1459 from nnnick/v2.0-dev-feature-time-axis
...
V2.0 dev feature time axis
2015-09-17 15:54:44 -06:00
Menno Dekker
5047678799
Tabs to spaces + fixed error
2015-09-17 10:08:42 +02:00
Menno Dekker
5ff2b530b9
Hover on dataset now works just like hover on label
...
Fixed some errors in de hover on dataset mode, only tested on bar charts
2015-09-17 09:43:02 +02:00
Tanner Linsley
2598446d54
Time Scale Rewrite
2015-09-15 11:40:01 -06:00
Evert Timberg
eb657bce36
Hide labels when the user returns null from the userCallback. This is the same as the category scale
2015-09-14 20:34:49 -04:00
Evert Timberg
c1f0a39982
Fixes to show all lines but not all labels. Added a variable in the template function to make debugging nicer.
2015-09-14 20:32:23 -04:00
Evert Timberg
b172a382f1
Remove dead code in logarithmic scale. Fixed a padding bug that had previously been fixed in the linear scale
2015-09-14 19:45:13 -04:00
Evert Timberg
77f90a85ef
Merge remote-tracking branch 'upstream/v2.0-dev' into feature/logarithmic_scale
2015-09-14 18:59:52 -04:00
Evert Timberg
e6220f474b
Attempting to make resize better
2015-09-14 18:50:52 -04:00
Tanner Linsley
88d30d8c93
Let tooltips use time formatted labels if they exist
2015-09-11 12:20:32 -06:00
Tanner Linsley
c2a7e4c251
Time Scale Base
2015-09-10 22:48:48 -06:00
Evert Timberg
3f75aabbc5
Better scale fitting algorithm to handle when label rotation changes due to the application of margins on the scale
2015-09-05 13:27:06 -04:00
Evert Timberg
6b6c388a1a
Helper for resize listener
2015-09-04 22:55:57 -04:00
Evert Timberg
4d51f21831
Merge pull request #1436 from honza889/reverse-radar
...
Reverse scale on radar / polar area
2015-09-02 17:46:35 -04:00