Commit Graph

921 Commits

Author SHA1 Message Date
etimberg
2efb974189 ensure that fullwidth boxes are at very top / bottom 2015-11-21 22:10:39 -05:00
Evert Timberg
7b719e6432 Modify layout service to be able to place horizontal boxes as either full width or not full width. Currently the legend is the only full width box we have. Scales were modified so as not to be full width, however Core.Scale can handle boxes that are full width.
Updated unit tests to use correct 'boxes' property of chart instance. Tests did not require numerical updates!

Added a test to cover placing a full width box.
2015-11-21 10:51:32 -05:00
Evert Timberg
2a9b3e5221 Merge branch 'v2.0-dev' into v2.0-legend
Conflicts:
	src/core/core.controller.js
2015-11-21 09:23:33 -05:00
Evert Timberg
800246660a Remove commented code 2015-11-19 21:20:04 -05:00
Evert Timberg
ca2e017f80 Update default tooltip configs for scatter charts. Made scatter charts a first class chart type. 2015-11-19 21:15:59 -05:00
Evert Timberg
1471a61609 Update default tooltip callbacks for bubble charts 2015-11-19 21:12:23 -05:00
Evert Timberg
82a74701a7 Merge pull request #1667 from nnnick/fix/pie-legend
Pie and Polar area legend functions
2015-11-18 21:38:52 -05:00
etimberg
7edcc0659b Fix polar area legends 2015-11-18 21:30:16 -05:00
etimberg
673e5d59a5 fix pie & doughnut legend 2015-11-18 21:24:49 -05: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
Tanner Linsley
5a80b9e501 Merge pull request #1645 from nnnick/fix/null-callback
Hide lines for which the tick label callback returns null or undefined
2015-11-16 16:10:16 -07:00
Tanner Linsley
ae9db841f9 Merge pull request #1646 from nnnick/fix/1640
Can now replace entire chart data object on the fly
2015-11-16 16:10:01 -07:00
Tanner Linsley
937d866bd3 Merge pull request #1647 from nnnick/fix/1324
Fall back to line settings for points if necessary
2015-11-16 16:09:53 -07:00
Tanner Linsley
592414330b Merge pull request #1644 from nnnick/fix/touch-events
Do not bind to touchend events for tooltips
2015-11-16 16:09:41 -07:00
Evert Timberg
0495e45ff7 Can now skip in all cases (start, mid, end) whether or not there is a look 2015-11-15 11:16:41 -05:00
Evert Timberg
045d8f6c2a Keep this as NaN so point._view.skip is set correctly 2015-11-15 11:16:17 -05:00
Evert Timberg
d61745a311 Handle transitioning NaNs 2015-11-14 22:49:53 -05:00
Evert Timberg
55c7d6872a Prevent NaN results when previous, point, and next are all the same 2015-11-14 22:49:08 -05:00
Evert Timberg
3bd9120a3a some duplicate code cleanup 2015-11-14 22:06:37 -05:00
Evert Timberg
01fe535594 Refactor the lineToNextPoint functionality to give the correct draw line behaviour. Makes the code a little cleaner too. 2015-11-14 21:57:22 -05:00
Evert Timberg
f6ac7d9369 Typo 2015-11-13 22:42:42 -05:00
Evert Timberg
0e02d216aa Cleanup 2015-11-13 22:42:33 -05:00
Evert Timberg
108c4fcd56 Simplify code for capping bezier control points. Cap the X direction as well. 2015-11-13 22:15:23 -05:00
Evert Timberg
05523b01b0 Refactor the line drawing code. Tests are broken. 2015-11-13 22:04:38 -05:00
Evert Timberg
7f34d8dd2f Always include padding to ensure that we can always see the tick labels of vertical axes 2015-11-13 13:24:22 -05:00
Evert Timberg
f85ffbc09c Use the dataset backgroundColor, borderWidth, and borderColor, if specified, for points. Added tests for this case. 2015-11-13 11:21:44 -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
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
Jan Kalina
ef539bf4a7 Reverse scale on radar/polar area 2015-09-02 23:21:39 +02:00
etimberg
eabdbab89e If the element has a label, use that in the tooltip instead of the dataset label. 2015-08-31 21:49:51 -04:00
Evert Timberg
c8d5856216 Start testing the linear scale fit code 2015-08-30 21:49:39 -04:00
Evert Timberg
ce623075e3 Add line controller tests. Fixed an issue when the number of data points changes. When adding the tension to a point, get the same tension as the line if it has been overridden at the dataset level. When setting the hover style of a point, allow setting the radius independently of the regular radius. Use the hoverRadius property in point.custom or the dataset.pointHoverRadius. Allow setting the border width independently at the dataset level. Use dataset.pointHoverBorderWidth. This can be an array or a number. 2015-08-30 17:42:42 -04:00
Evert Timberg
8e9de00529 Doughnut controller tests 2015-08-30 14:56:48 -04:00
Evert Timberg
fcad4de670 Finish up bar controller tests 2015-08-30 10:42:00 -04:00
Evert Timberg
471618d287 Initial bar controller tests 2015-08-29 22:27:40 -04:00
Evert Timberg
eadfbbee6f Initial line element tests. Did not test the skipNull functionality since it seems to be broken. 2015-08-29 14:16:37 -04:00
Evert Timberg
17c075eb0e Arc element tests 2015-08-29 12:31:44 -04:00
Evert Timberg
26684b6371 Rectangle element tests 2015-08-29 08:53:42 -04:00
Evert Timberg
c09414cc40 First set of tests for point. Started on a mockContext object for testing. Still need to handle property setting better (fillStyle, strokeStyle, etc) 2015-08-28 23:09:58 -04:00
Evert Timberg
371bc8913f Start writing tests for core.helpers. Fix a number of small bugs found during testing 2015-08-28 22:32:56 -04:00
Tanner Linsley
bc3948ce59 Merge pull request #1408 from etimberg/feature/unit-test
Initial unit test framework + linear scale test starting point
2015-08-28 16:26:10 -06:00
Tanner Linsley
bade753fe3 Don't account for paddingLeft until after rotated 2015-08-28 15:12:35 -06:00
Evert Timberg
b4b3bf60b8 Remove wrong addition of padding 2015-08-23 17:17:21 -04:00
Evert Timberg
04d1f0f710 Category scale filter function will hide the grid line if null or undefined returned. 2015-08-23 13:20:43 -04:00
Evert Timberg
02abc46d5e Count the number of bars when determining the bar width 2015-08-22 16:56:02 -04:00
Evert Timberg
86ecca1c38 If setLineDash is not available, do not set it. 2015-08-22 16:13:19 -04:00
Evert Timberg
de413294ca Category scale now takes a smaller size if no labels are being displayed.
Updated linear scale code to use proper bottom padding. This is important when not displaying x axis labels
2015-08-22 14:30:30 -04:00
Evert Timberg
3dd2ee7968 Merge branch 'v2.0-dev' of https://github.com/nnnick/Chart.js into fix/template-caching 2015-08-15 10:57:13 -04:00
Evert Timberg
24a78e772c Proper template string caching 2015-08-15 10:56:55 -04:00
Evert Timberg
dd62944b79 Fix bracket placement 2015-08-15 10:54:34 -04:00
Fabian Strachanski
94c1ec4b84 Fix for #1373 2015-08-13 10:50:56 +02:00
Evert Timberg
eb833723cd initial logarithmic scale 2015-08-08 18:34:19 -04:00
Evert Timberg
88896abe48 During a mousemove event only re-render the chart instead of updating it. Updating uses more memory & causes flicker in the axes. 2015-08-08 18:12:01 -04:00
Evert Timberg
87ac933c10 Linear scale has proper padding in both vertical and horizontal orientations. Should prevent labels from getting cut off even when axes are not displayed. 2015-08-08 11:52:20 -04:00
Evert Timberg
9dfa9e8e66 Fix the outerRadius calculation with respect to the border width. Previously the border width was divided by 2 twice rather than once. 2015-08-08 10:14:37 -04:00
Tanner Linsley
f5b44acc38 onAnimationComplete for zero-frame transitions 2015-08-07 13:39:09 -06:00
Michaël Gallego
0c6f37fff7 Add support for mirror option 2015-08-05 17:40:44 +02:00
Tanner Linsley
f3706b0755 chart.update(0) now draws instantly instead of not at all 2015-08-04 11:24:27 -06:00
Tanner Linsley
26c210db33 More Accurate animation frame dropper 2015-08-03 17:17:49 -06:00
Tanner Linsley
452ef8b6e7 No Logs 2015-08-03 13:06:53 -06:00
Tanner Linsley
68b22562d9 DatasetWidth now incorporates chartPaddingLeft 2015-08-03 13:06:40 -06:00
Tanner Linsley
d3ffc7aec1 Auto Skip Labels Attempt 1 2015-07-06 22:28:05 -04:00
Evert Timberg
925e305184 Doughnut legends (only makes sense for first dataset). 2015-07-05 14:56:22 -04:00
Evert Timberg
84aba3f6d3 Polar area legends 2015-07-05 14:48:04 -04:00
Evert Timberg
0caa2a79ae Legends for Line, Bar & Radar charts. 2015-07-05 14:47:56 -04:00
Evert Timberg
dfd48debe5 Remove log call from polar area draw. 2015-07-05 14:36:27 -04:00
Evert Timberg
6110352df8 Add userCallback to category scale + demo file 2015-06-22 19:03:01 -04:00
Tanner Linsley
bc8526efe7 Merge remote-tracking branch 'origin/v2.0-dev' into v2.0-dev 2015-06-22 13:10:52 -06:00
Tanner Linsley
25fd84490b Support for custom tooltips again 2015-06-22 13:10:49 -06:00
Evert Timberg
82de2f1351 Can now change more properties for line drawing. Updated the sample file to demo 2015-06-20 09:47:35 -04:00
Evert Timberg
48be4edbdd Category scale label rotation improvements 2015-06-19 20:24:14 -04:00
Evert Timberg
46af76a8ed addData is now supported by the doughnut chart + updated the sample to match. 2015-06-19 19:51:28 -04:00
Evert Timberg
2dd49f0c92 Fix a missing this in the scale generateTicks method when manually overriding. Added a sample to test this. 2015-06-19 19:13:31 -04:00
Tanner Linsley
539af61e1f Proper stacking order for stacked area charts 2015-06-19 14:23:05 -06:00
Tanner Linsley
85e928b426 Lazy Update and Render option
Usage: `.update(animationDuration, [bool])`
Tooltip animations are now "lazy” by default, meaning they can be
interrupted and pivoted by other animations. All others internal
updates are by nature non-interruptible, so hovering over a chart
during a regular `update()` cycle will pivot the tooltip correctly.
2015-06-19 13:29:36 -06:00
Tanner Linsley
8cecd5935e Tooltip Title width now accurately measured 2015-06-19 12:36:22 -06:00
Tanner Linsley
4e30531907 Allow custom skip property to points 2015-06-18 12:49:09 -06:00
Evert Timberg
7796c4e87d Add and remove data for bar charts 2015-06-17 22:03:24 -04:00
Tanner Linsley
061566ee27 Fix Label custom tooltips 2015-06-17 15:14:26 -06:00
Tanner Linsley
79f8ce0e97 Fixed Custom Tooltips 2015-06-17 15:10:45 -06:00
Evert Timberg
19a30f5090 Update controllers to handle adding new datasets 2015-06-16 22:04:52 -04:00
Evert Timberg
056b9550d0 Create interfaces similar to the old interfaces. Ensure that scales always have IDs before controllers are built. 2015-06-16 19:20:26 -04:00
Tanner Linsley
8d1f280771 Even better responsive sizing 2015-06-16 13:19:01 -06:00
Tanner Linsley
63530ba66d Better responsive sizing 2015-06-16 13:06:34 -06:00
Tanner Linsley
088b4fcc55 Fixed: scale.linear range min==max resulted in no scale 2015-06-16 12:04:52 -06:00
Tanner Linsley
e3ffbb155f Deprecate animationLoop function 2015-06-16 11:57:35 -06:00
Tanner Linsley
48b8a3a2c5 Fixed issue where arc.inRange was sometimes over π threshold 2015-06-16 11:46:50 -06:00
Tanner Linsley
a5e4b38252 Draw controllers in reverse (for proper line stacking) 2015-06-16 11:37:07 -06:00
Tanner Linsley
6065e8c801 helpers.each is now reversible 2015-06-16 11:31:15 -06:00
Tanner Linsley
cd5a8d1a50 Fix getMaximumHeight function to use helpers 2015-06-16 11:24:25 -06:00
Derek Perkins
0d5f282349 Merge pull request #1219 from etimberg/feature/controllers
Controller Driven Charts
2015-06-16 10:50:31 -06:00
Tanner Linsley
db981807bb Polar Area Draws, but has scale resizing issues 2015-06-16 00:39:04 -06:00
Tanner Linsley
c0ccae1031 No logging 2015-06-16 00:20:22 -06:00
Tanner Linsley
9023057906 Old doughnuts are no good. 2015-06-16 00:20:06 -06:00
Tanner Linsley
2d5eb6d57e Radar chart and radialLinear scale 2015-06-16 00:17:26 -06:00
Tanner Linsley
42648d0a83 Build radial scale details inside itself 2015-06-15 23:59:04 -06:00
Tanner Linsley
4c749e78b2 Single scale again. 2015-06-15 23:58:31 -06:00
Tanner Linsley
ef1acfa0e8 Build single scales in core 2015-06-15 23:54:25 -06:00
Tanner Linsley
5759f419c0 Pie used new doughnut controller 2015-06-15 22:47:20 -06:00
Tanner Linsley
8b3424bd09 Responsive used proper "each" from helpers 2015-06-15 22:44:06 -06:00
Tanner Linsley
76e060cf97 Better getElementAtEvent function 2015-06-15 22:43:45 -06:00
Tanner Linsley
2aa489643a Doughnut/Pie accurate radii 2015-06-15 22:43:24 -06:00
Tanner Linsley
36de623401 Merge remote-tracking branch 'origin/feature/controllers' into feature/controllers 2015-06-15 19:14:26 -06:00
Tanner Linsley
74f161b548 Core improvements, arc & doughnut partially working 2015-06-15 19:14:11 -06:00
Evert Timberg
fa1b0db453 Apply correct hover styles 2015-06-15 19:34:40 -04:00
Evert Timberg
d3538a1fbd use inLabelRange when tooltips are in label mode 2015-06-15 19:21:13 -04:00
Evert Timberg
b21061c164 Remove hover styles 2015-06-15 19:10:47 -04:00
Evert Timberg
8e3d3c2c22 Fix animations 2015-06-15 18:54:46 -04:00
Tanner Linsley
872c9d5ebb Hover macros, type defaults, and cleanup 2015-06-15 16:18:56 -06:00
Evert Timberg
76d2a782fc Linear scale is reversible 2015-06-15 17:31:29 -04:00
Tanner Linsley
257bdb2dbb Hybrid Line and Bar chart - Line Now drawing 2015-06-15 15:27:56 -06:00
Tanner Linsley
b0ece8b516 New controllers, bar drawing (with errors) 2015-06-15 14:36:02 -06:00
Tanner Linsley
aaa2484e1b Controller function organization 2015-06-14 19:42:39 -06:00
Tanner Linsley
43f2c015f3 Charts become config blocks (themes, if you will :) 2015-06-14 19:30:02 -06:00
Tanner Linsley
d811812356 Little tweaks 2015-06-14 19:26:44 -06:00
Tanner Linsley
d73dae09e7 No hardcoded chart type methods 2015-06-14 19:15:10 -06:00
Tanner Linsley
4047440acc Git thinks the core file is new now haha 2015-06-14 18:10:00 -06:00
Tanner Linsley
3f9afb1f31 More core file separation, and no duplicate copyrights 2015-06-14 18:09:45 -06:00
Evert Timberg
81c66c8d85 Fix duplicate property 2015-06-14 17:05:46 -04:00
Evert Timberg
0fa2ac4ea0 Bar chart now uses the rectangular canvas & element controllers. 2015-06-14 15:26:34 -04:00
Evert Timberg
886c99623f Drop the base class in favour of an expanded canvas controller. Renamed 'chart' to 'chartInstance' in the controllers 2015-06-14 13:37:37 -04:00
Evert Timberg
68ae02263b Fix the broken scatter chart. Introduced the concept of a canvas controller that goes along with the element controller. 2015-06-14 13:00:09 -04:00
Evert Timberg
9751e8f5b1 Created a generic base class to be used by rectangular charts. Modified Chart.Type.extend to put the parent's prototype in __super__. Moved more code into the controller and renamed the controller to RectangularElementController. 2015-06-14 10:35:59 -04:00
Evert Timberg
89574b61c5 Prototype controller + some of line chart converted 2015-06-13 20:40:35 -04:00
Evert Timberg
8c34bdbcd7 Clean up of radial linear scale. Radar chart update function improvements 2015-06-13 17:45:59 -04:00
Evert Timberg
ecd3b58b28 Fix typo in linear scale. 2015-06-13 14:47:13 -04:00
Evert Timberg
47b25d1c6d Move linearRadial default config to be a property of the scale. 2015-06-13 14:16:01 -04:00
Evert Timberg
109de75c6a Create linear scale default settings. Cleaned up unnecessary settings from bar, line, and scatter default configs. Removed unnecessary config options from the affected sample files 2015-06-13 13:57:55 -04:00
Evert Timberg
faa43d51a9 Category scale now has defaults. Updated the bar & line charts to use this new default. 2015-06-13 13:25:41 -04:00
Evert Timberg
3e4fce58fa Clone handles arrays better 2015-06-13 13:22:28 -04:00
Evert Timberg
b0bddce017 Remove some unused scale code 2015-06-13 11:45:30 -04:00
Evert Timberg
b5c69984e3 Change spaces to tabs throughout 2015-06-13 10:15:21 -04:00
Evert Timberg
1f16b349d2 Merge Chart.scales into Chart.scaleService to be consistent 2015-06-13 09:55:43 -04:00
Evert Timberg
30019dfddd Move some of the radial linear scale functions into the radialLinear scale 2015-06-13 09:51:28 -04:00
Evert Timberg
6582e2ff06 Handle nesting better in the clone method so that we don't wipe out the line defaults when the scatter chart extends 2015-06-13 08:59:54 -04:00
Evert Timberg
8cfe21f6aa Scatter chart now extends the line chart. 2015-06-13 08:46:49 -04:00
Evert Timberg
6815fc451f Merge remote-tracking branch 'upstream/v2.0-dev' into feature/v2.0-scale-refactor 2015-06-13 08:35:34 -04:00
Tanner Linsley
31643ee598 Support jQuery' or native canvas element as chart context 2015-06-13 02:41:15 -06:00
Tanner Linsley
1a3bb25f5c Reverse that :) 2015-06-13 02:13:38 -06:00
Tanner Linsley
181a61f16a Do not update involuntarily on resize. Only render. 2015-06-13 02:08:55 -06:00
Tanner Linsley
763bde9ed1 chart.bar - remove tooltip on mouseout 2015-06-13 00:45:43 -06:00
Tanner Linsley
0486db1e74 Category Scale display false fixes 2015-06-13 00:30:42 -06:00
Evert Timberg
6185f156ea Make the line and scatter charts almost identical. Next step is to merge them 2015-06-12 22:35:48 -04:00
Evert Timberg
d37e65c58c Convert line chart to tabs from spaces 2015-06-12 22:07:07 -04:00
Evert Timberg
e55c0d4945 Push some of the scatter scale information down to the linear scale. 2015-06-12 21:46:47 -04:00
Evert Timberg
49fe78643a Removed unused options from the bar and line charts 2015-06-12 21:16:23 -04:00
Evert Timberg
d2ef4c9831 Move more data into the linear scale.This simplifies buildScale for line and bar charts 2015-06-12 21:15:15 -04:00
Evert Timberg
ec7b87d69c Move some functions into the category scale. This cleans up the bar chart interface & allows for waterfall charts by settings stacked to false on the category axis but stacked to true on the y axis 2015-06-12 20:50:26 -04:00
Tanner Linsley
e9f206606d Merge remote-tracking branch 'origin/v2.0-dev' into v2.0-dev 2015-06-12 16:39:43 -06:00
Evert Timberg
c5e4912319 Rename 'scaleType' property to 'type; throughout samples & code 2015-06-12 18:24:51 -04:00
Tanner Linsley
63b7b18b17 Category Scale fixed 2015-06-12 16:18:20 -06:00
Tanner Linsley
cfc008686b File structure fixes and gulp watch working again 2015-06-12 16:15:33 -06:00
Tanner Linsley
e1237feb97 File structure for extensibility 2015-06-12 16:08:27 -06:00
Tanner Linsley
cf88ec8333 File structure fixes, Radar Chart tooltip fixes 2015-06-12 15:37:38 -06:00
Tanner Linsley
bba2dda59a No Logging 2015-06-12 15:28:50 -06:00
Tanner Linsley
e2601f71e3 Hidden Scales Fixes 2015-06-12 15:28:30 -06:00
Tanner Linsley
195c794e5d File structure fixes 2015-06-12 14:48:20 -06:00
Tanner Linsley
5732e0d72a More maintainable file structure 2015-06-12 14:00:48 -06:00
Tanner Linsley
187163763e Line element custom override support 2015-06-11 10:04:08 -06:00
Tanner Linsley
a76640c409 Merge remote-tracking branch 'origin/v2.0-dev' into v2.0-dev 2015-06-11 01:06:07 -06:00
Tanner Linsley
11773a5825 Hover states, Scale padding, and mouse out fixes 2015-06-11 01:05:44 -06:00
Evert Timberg
55cf07926c By default use toLocaleString() when generating labels for the axes. This prevents misformatted numbers due to doubles. It also makes large numbers nicer with commas by default. 2015-06-10 20:08:12 -04:00
Evert Timberg
bd39534c2f Merge pull request #1187 from etimberg/fix/config-merge-clone
Fix an error when merging null config values
2015-06-09 20:36:44 -04:00
Evert Timberg
9dc63f0349 Merge pull request #1186 from etimberg/fix/log10
Use a polyfill when Math.log10 does not exist
2015-06-09 20:36:23 -04:00
Evert Timberg
edd93f27ce Merge pull request #1180 from etimberg/fix/scale-zero-point
Use the correct base for linear scales
2015-06-09 20:36:15 -04:00
Evert Timberg
97a2232fbf Forgot that typeof null === 'object'
Added a check for this condition so that merge works correctly
2015-06-09 18:43:33 -04:00
Evert Timberg
29743e1d63 Use a polyfill when Math.log10 does not exist 2015-06-09 18:24:43 -04:00
Evert Timberg
2bddccaaf0 Use the correct base for linear scales. This gives the correct fill for lines and animations start at the correct point 2015-06-08 19:03:47 -04:00
Tanner Linsley
8f5d702a86 chart.update(animationDuration) support 2015-06-08 15:57:47 -06:00
Tanner Linsley
679fa4e72e Clone in configMerge 2015-06-08 13:12:20 -06:00
Evert Timberg
7d4ead51f7 Merge branch 'fix/polar-area-angle-fix' of https://github.com/etimberg/Chart.js into etimberg-fix/polar-area-angle-fix
Conflicts:
	src/Chart.Core.js
2015-06-07 09:48:05 -04:00
Evert Timberg
bcd834c084 Merge pull request #1169 from etimberg/fix/skip-data-type
Only skip when the data is null, not when it is not a number
2015-06-07 09:38:17 -04:00
Evert Timberg
d05d29aa66 Make the angle calculations more robust. Also ensure that angles in polar area charts are calculated similarly to angles in doughnut / pie charts 2015-06-06 11:06:40 -04:00
Evert Timberg
4a3a9f1a21 Change the scale fitting code from 2 pass fit to a 2.5 pass fit. The fit function is now passed a margin object that contains the margins on the left, top, right, and bottom of the scale. This is useful to know if you can draw outside of the width. This is used by the dataset scale so that extra padding is only added for long labels if absolutely required. If there is unused space underneath the vertical axes, that space is used first. 2015-06-06 09:27:03 -04:00
Evert Timberg
a89ede0d72 Bring linear axis labels closer to the tick marks when in a horizontal configuration. Reduced excess whitespace. 2015-06-06 08:21:16 -04:00
Evert Timberg
65ec618a48 Some improvements to the linear scale. Made the tick marks smaller (5px vs 10px) and tightened up the drawing. Removed the use of maxWidth in ctx.fillText since that is not supported in Safari 2015-06-06 08:12:13 -04:00
Evert Timberg
e63d5a3367 Only skip when the data is null, not when it is not a number 2015-06-05 18:03:35 -04:00
Tanner Linsley
5b5463b6f9 Merge pull request #1164 from etimberg/fix/angle-calculation
Fix the angle calculation for slice detection
2015-06-04 16:39:59 -06:00
Tanner Linsley
205163641f Doughnut/Pie Fixes 2015-06-04 16:39:05 -06:00
Evert Timberg
09eae7ff28 Fix angle calculation in determining which arcs are underneath the event point 2015-06-04 18:31:44 -04:00
Evert Timberg
9e9f436454 Bar config cleanup + some initial docs 2015-06-03 20:55:17 -04:00
Tanner Linsley
70f7dd4c7d Default global responsive 2015-06-03 18:47:14 -06:00
Evert Timberg
f12d1bcb56 Cleaned up line docs a bit and remove unnecessary options 2015-06-03 20:25:43 -04:00
Evert Timberg
b9ab70f21b Cleaned up global config + documentation of global config options 2015-06-03 19:54:34 -04:00
Evert Timberg
c2d6e4c31f Reset elements for polar area chart 2015-06-03 19:24:29 -04:00
Evert Timberg
a6c712323f Reset elements for donut charts 2015-06-03 19:16:42 -04:00
Evert Timberg
b93306788b Merge branch 'feature/v2.0dev-nestedConfig' of https://github.com/etimberg/Chart.js into feature/v2.0dev-nestedConfig 2015-06-03 18:36:08 -04:00
Evert Timberg
2a62e0e04d Reset elements for bar charts. Bar multi axis demo also shows different colours for each bar. 2015-06-03 18:35:42 -04:00
Tanner Linsley
8e5d8b8861 Doughnut and polar hovering/clicking 2015-06-03 16:31:25 -06:00
Tanner Linsley
b3b5896329 Polar Area 2015-06-03 14:45:40 -06:00
Tanner Linsley
ecb1cde3fc Fix 2015-06-03 14:17:10 -06:00
Tanner Linsley
9be48a73ea Pie Chart 2015-06-03 14:14:23 -06:00
Tanner Linsley
7e791e02f2 Radar Chart skipNull & bezier fixes 2015-06-03 12:05:04 -06:00
Evert Timberg
06d55e3501 Get closer to having radar charts work. Some issues with the line & point drawing code. 2015-06-03 08:02:21 -04:00
Evert Timberg
37cfbdb802 Fix an issue with bar charts that are not stacked 2015-06-03 07:57:50 -04:00
Evert Timberg
8d1a857e75 Scatter tooltips 2015-06-02 20:50:36 -04:00
Evert Timberg
42e2c237d4 Bind events in scatter chart 2015-06-02 20:48:26 -04:00
Evert Timberg
b22e1e3e9c Update scatter chart. Still need to get tooltips working 2015-06-02 20:44:24 -04:00
Evert Timberg
635ec58616 Merge branch 'feature/v2.0dev-nestedConfig' of https://github.com/etimberg/Chart.js into feature/v2.0dev-nestedConfig 2015-06-02 20:07:07 -04:00
Evert Timberg
f44dd06826 Better animations when chart is first initialized. 2015-06-02 20:06:50 -04:00
Tanner Linsley
02d7442e4f !bar borderWidth 2015-06-02 17:29:17 -06:00
Tanner Linsley
4ded634d75 no logging 2015-06-02 17:13:47 -06:00
Evert Timberg
80a25af502 Merge branch 'feature/v2.0dev-nestedConfig' of https://github.com/etimberg/Chart.js into feature/v2.0dev-nestedConfig 2015-06-02 18:55:41 -04:00
Evert Timberg
9b2d2efc7a Animation on refresh 2015-06-02 18:54:18 -04:00
Tanner Linsley
6b0e609935 Bar Chart Stacked nestedConfig 2015-06-02 16:48:39 -06:00
Tanner Linsley
74d3890ba9 no legend yet... :( 2015-06-02 15:14:51 -06:00
Tanner Linsley
df4d2d2594 Stroked tooltip colors 2015-06-02 15:14:06 -06:00
Tanner Linsley
b7dc2339f4 line: skipNull functionality 2015-06-02 13:42:09 -06:00
Evert Timberg
edbb235668 Tooltip titles now work in the line chart. Getting ever closer to being done 2015-05-31 20:16:04 -04:00
Evert Timberg
92776ce0ac Animations & tool tips show. The title is not correct yet. 2015-05-31 16:55:17 -04:00
Evert Timberg
e48c7f168b Add back line fill option. This is set on a per dataset basis, but there is an override in the config. Demo this in the line sample. 2015-05-31 10:24:53 -04:00
Evert Timberg
8a550852da Check in work from floobits with minor changes to fix some errors 2015-05-31 09:47:10 -04:00
Tanner Linsley
6af94298ec Radar Chart 2015-05-27 10:28:00 -06:00
Tanner Linsley
1163efbcca Merge remote-tracking branch 'origin/v2.0-dev' into v2.0-dev
Conflicts:
	src/Chart.PolarArea.js
2015-05-26 22:06:20 -06:00
Tanner Linsley
3a32144d89 Polar Area deep data 2015-05-26 22:02:41 -06:00
Evert Timberg
e3519f5bd4 More nested config stuff. Not sure what all of the options in the line config do, but left them in. Ensured that tooltips work. 2015-05-26 21:16:18 -04:00
Evert Timberg
7d8b1712a7 Convert bar chart to use nested config. Noticed that the segmentShowStroke option wasn't used at all. 2015-05-26 19:30:34 -04:00
Evert Timberg
54b51038ca Updated bar chart to use new nested config for bars. Removed unused relativeBars option. barBorderWidth was not used, but seems useful so we will keep it until later refactoring. 2015-05-26 19:11:05 -04:00
Evert Timberg
e774a893da Use new animation options in the animation service. 2015-05-26 18:54:36 -04:00
Tanner Linsley
b03a057a76 Nested globals 2015-05-26 16:52:16 -06:00
Evert Timberg
a2d477ac5e Moved radial scale into Chat.Scale.js. Registered as "radialLinear" which will allow radialLogarithmic, etc in the future. Updated the polar area and radar charts to use the new scale config. The scales draw, but the points do not. This is no different than the current v2.0 branch 2015-05-24 14:33:12 -04:00
Evert Timberg
1352dfeb0f Fix the y scales that were missed in the previous check in 2015-05-23 21:49:01 -04:00
Evert Timberg
d4e7765a50 Clean up some unused config options. Renamed 'show' to 'display' for scales since that was clearer and maintains backwards compatibility. 2015-05-23 21:44:50 -04:00
Evert Timberg
73b579c962 Remove old linear scale 2015-05-23 21:21:40 -04:00
Evert Timberg
b67afcd727 Bar chart converted to new scale system. Added bar chart multi axis sample. 2015-05-23 18:26:34 -04:00
Evert Timberg
a10e245e5a Use correct tooltip events in each chart 2015-05-23 18:15:57 -04:00
Evert Timberg
d998c803d3 Move line chart over to use new scale config. This adds support for multiple y axes. Added an example demonstrating this. 2015-05-23 15:19:30 -04:00
Evert Timberg
a559ab85cd Ensure consistency in the helpers.toRadians name 2015-05-23 15:18:33 -04:00
Evert Timberg
c66edc9169 dataset axis to be used in the line chart and the bar chart 2015-05-23 15:18:08 -04:00
Evert Timberg
b7606c7a8d Rename onHover to events to match the line chart 2015-05-23 15:15:04 -04:00
Evert Timberg
12e2ace039 Merge remote-tracking branch 'upstream/v2.0-dev' into feature/v2.0dev-xy
Conflicts:
	src/Chart.Core.js

Fixed the sample files & chart type initialize methods so that this.data does not get set to undefined.
2015-05-20 09:03:22 -04:00
Evert Timberg
ed4b9945f8 Initial dataset scale class 2015-05-20 08:33:26 -04:00
Tanner Linsley
951e714e77 Playground and big changes 2015-05-20 00:03:45 -07:00
Evert Timberg
008bb1aab3 Set new tooltip templates for the scatter chart 2015-05-19 20:33:39 -04:00
Evert Timberg
4cc24d475a Clean up the scale service. It's now more of a helper function for fitting the scales. Since each chart needed to know it's scales, there wasn't much point in registering them into the service. When we support overlapping charts, we can do something fancier 2015-05-19 18:22:05 -04:00
etimberg
4b8c9bc30d Fix a drawing bug when drawTicks is false. 2015-05-18 20:59:21 -04:00
etimberg
978ed1bc1e Created a multi axis sample file. Added an option to draw ticks for the axes. This is useful when in a multi axis scenario so that the axis that does not draw grid lines does not have weird lines. 2015-05-18 20:39:59 -04:00
etimberg
676765e808 Initial config merge. Handles special cases for objects and arrays and merges smarter than simply replacing the default object. Tested by overriding the vertical axis 0 point colour. Also implemented dataset axis binding. If nothing is specified, the dataset is bound to the first x and y axis. 2015-05-18 14:19:34 -04:00
Evert Timberg
f2065265c8 Fix an error in the scale service that prevented the chart from filling the canvas fully. 2015-05-18 10:27:39 -04:00
Evert Timberg
a6e2eec9e0 Linear scale drawing improvements. Ensured that the scatter plot configuration has a different line colour for the 0 axis 2015-05-18 09:39:01 -04:00
Evert Timberg
2e383da0d8 Handle the beginAtZero option for a linear scale. Added a helper for Math.sign 2015-05-18 08:51:13 -04:00
Evert Timberg
492292e94b Remove x label rotation code since we dynamically adjust the number of labels to show and as such do not need to rotate 2015-05-18 08:43:38 -04:00
Evert Timberg
454f519b6d Fix jshint warnings 2015-05-18 08:27:18 -04:00
Evert Timberg
56d53e3ad4 Ensure that you always have at least 2 ticks on the linear axis 2015-05-17 13:29:17 -04:00
Evert Timberg
67b3d32218 Initial implementation of a scatter chart. Uses a new style of config from the other charts. For now, the config is not changeable. 2015-05-17 13:20:37 -04:00
Evert Timberg
db1365c8ce Initial check in of the scale service and the scale constructor registration. An initial implementation of a linear scale that can be drawn in both horizontal and vertical orientations. 2015-05-16 19:40:52 -04:00
Evert Timberg
b5b0081108 Some helper functions needed for better scales. 2015-05-16 19:38:31 -04:00
Tanner Linsley
fff81c455d Tooltip Position, Active Element Position, Tooltip animation follow 2015-05-15 23:07:21 -06:00
Tanner Linsley
ad972a0c5c Pie cleanup. 2015-05-15 22:45:17 -06:00
Tanner Linsley
872c92cd4b Doughnut/Pie Chart refactor 2015-05-15 22:34:08 -06:00
Tanner Linsley
1d8d19d404 Prettified, and half way through doughut 2015-05-15 20:54:01 -06:00
Tanner Linsley
ed6f234205 Bar chart pivot fix 2015-05-15 17:14:09 -06:00
Tanner Linsley
09c11440dd inGroupRange function for bar charts label mode 2015-05-15 17:07:41 -06:00
Tanner Linsley
e58421a08a Line Chart label hoverMode & tooltips 2015-05-15 17:03:51 -06:00
Tanner Linsley
fb580a6e48 lineChart single hoverMode tooltips, fallbackColor global 2015-05-15 16:40:01 -06:00
Tanner Linsley
f79ebdaa88 Stable Bar Chart, DRY core functions 2015-05-15 00:04:42 -06:00
Tanner Linsley
b432a3d6db labelMode tooltips and hover events 2015-05-14 23:18:47 -06:00
Tanner Linsley
ef4c46f2be labelMode Tooltips almost there! 2015-05-14 17:25:56 -06:00
Tanner Linsley
4ef57315da Getting into 'label' hoverMode tooltips 2015-05-12 17:22:47 -06:00
Tanner Linsley
63e115e7a8 hoverMode: "single" tooltips 2015-05-12 15:47:24 -06:00
Tanner Linsley
9f98334d6f Mid-code commit 2015-05-12 15:42:20 -06:00
Tanner Linsley
15f724f146 Rough Tooltips for 'single' hoverMode 2015-05-12 12:55:48 -06:00
Tanner Linsley
afb22d15ae Better events 2015-05-12 10:35:55 -06:00
etimberg
460399f651 Merge branch 'fix/bar_chart_negative_values' of https://github.com/etimberg/Chart.js into etimberg-fix/bar_chart_negative_values
# Conflicts:
#	samples/bar.html
#	src/Chart.Bar.js
#	src/Chart.Core.js
2015-05-12 08:00:14 -04:00
Tanner Linsley
9e4d90e110 Color Animation, Color Autopilot 2015-05-12 01:13:16 -06:00
Tanner Linsley
df91739b77 hoverMode, onHover, key fixes 2015-05-11 19:43:17 -06:00
Tanner Linsley
d3f7071983 Merge pull request #1114 from etimberg/feature/get_bar_at_event
Create a getBarAtEvent function that returns the single bar that was clicked on
2015-05-11 19:27:52 -06:00
etimberg
d287a01b44 Make sure that the _start item is cleaned up during save. 2015-05-11 21:22:37 -04:00
Tanner Linsley
0e29cfdfda Bar attempt #5 2015-05-11 18:12:44 -06:00
Tanner Linsley
cf07df07d6 Bar Attempt # 4 2015-05-08 16:20:21 -06:00
Tanner Linsley
4b34bbadf9 Merge pull request #1098 from WouterSioen/fix-typo
Fix typo
2015-05-05 16:01:30 -06:00
William Entriken
5443886ec3 Merge pull request #1068 from nnnick/animation-refactory
Animation refactory
2015-05-04 15:55:59 -04:00
William Entriken
a8063de6b8 Merge pull request #856 from tannerlinsley/editable-chart-config
Data now editable right from chart config
2015-05-04 15:28:03 -04:00
Evert Timberg
e13ada2b43 Ensure that the bar draws to the correct spot 2015-05-02 15:03:40 -04:00
Evert Timberg
62b29282fd Fix a minor bug 2015-05-02 14:59:33 -04:00
Evert Timberg
2814c8e44c Remove Math.sign 2015-05-02 14:56:16 -04:00
William Entriken
7f513b87ee Merge pull request #952 from msmiley/patch-1
add datasetLabel for multiTooltip on dynamically-added points
2015-04-24 16:32:24 -04:00
William Entriken
a3d4bc0bfe Merge pull request #851 from jtblin/master
Fix #507 - calculate container width and heigh without padding
2015-04-24 10:28:29 -04:00
Evert Timberg
e67d198e69 Create a getBarAtEvent function that returns the single bar that was clicked on 2015-04-18 09:56:40 -04:00
Evert Timberg
b5692c8534 Merge pull request #1069 from mackuba/fix_endpoint
Prevent taking vertical space for X labels more than once
2015-04-17 06:33:42 -04:00
Kuba Suder
2e311896ad prevent taking vertical space for x labels more than once
calculateXLabelRotation() subtracts space needed for x labels from
this.endPoint, but if this block is called more than once then the space
is subtracted more than once and the chart gets smaller and smaller with
every iteration
2015-04-16 22:23:17 +02:00
William Entriken
b0a780822a Merge pull request #1025 from pijey/feature/offsetgridlines-linechart
Add offsetGridLines option to Line charts
2015-04-16 15:27:43 -04:00
William Entriken
889c9de779 Merge #756 Fixes #661 2015-04-16 15:17:28 -04:00
Evert Timberg
604d6bd4e3 Merge pull request #677 from rylanhalteman/fix-yLabel-padding
add 10 to yLabelWidth on set, rather than on use
2015-04-12 08:06:23 -04:00
Tanner Linsley
14f4fae786 Only start digest on first request. Cleanup 2015-04-12 00:05:31 -06:00
Evert Timberg
c476db0dd7 Use findNextWhere correctly. 2015-04-11 23:05:05 -04:00
Evert Timberg
0a5f92a854 Remove the minAnimationSteps option since we did not end up needing it. 2015-04-11 21:11:49 -04:00
Evert Timberg
b1cbf04f25 Remove the unused lastTimeRun from the animation service 2015-04-11 20:47:35 -04:00
Tanner Linsley
70b8bf106c Always execute last frame 2015-04-11 18:42:11 -06:00
Tanner Linsley
99bf85e913 Merge remote-tracking branch 'origin/animation-refactory' into animation-refactory
Conflicts:
	src/Chart.Core.js
2015-04-11 18:37:01 -06:00
Tanner Linsley
e0c208be58 Frame Dropper 2015-04-11 18:34:06 -06:00
Evert Timberg
26eca23706 Implement cancel animation frame in the animation service 2015-04-11 20:17:46 -04:00
Evert Timberg
98253fea5d Fix some bugs in the animation stuff 2015-04-11 20:08:17 -04:00
Evert Timberg
9a13dd78fc Fix a typo 2015-04-11 19:42:54 -04:00
Evert Timberg
3e59438646 Integrate animation service with chart 2015-04-11 19:33:20 -04:00
Tanner Linsley
7a6f2b4f06 Src changes... derrrr 2015-04-11 17:30:06 -06:00
Evert Timberg
d3579334b2 Add an option to control the minimum number of animation steps. 2015-04-11 19:17:30 -04:00
Evert Timberg
0b8fd966ff Chart animations will now use the animation service provided in Chart.animationService. 2015-04-11 19:02:50 -04:00
Evert Timberg
972bc5636d Merge pull request #711 from cmweiss/master
Default color for Doughnut/Pie
2015-04-09 11:25:45 -04:00
dima117
4009dbd6a0 helpers.generateLabels throws "labelTemplateString is not defined" exception #1035 2015-03-31 22:06:41 +03:00
pijey
2677360f4b Add offsetGridLines option to Line charts 2015-03-25 11:51:56 +01:00