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
1692b977cd
Fixed tab sizing in core.helpers.js
2016-02-05 09:43:20 +01: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
Robert Becker
ba6afa7257
Fixed label callbacks adding only a single line instead of multiple lines as stated in docs.
2016-02-04 10:35:53 +01:00
Evert Timberg
dfaf786e1a
Always show lines by default.
2016-02-02 20:14:59 -05: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
bfd6f5f78e
Radar controller tests
2016-01-27 18:00:32 -05:00
Evert Timberg
d0a0d57fe2
Initial polar area tests
2016-01-24 13:29:13 -05:00
Evert Timberg
6aa2933ec5
Bubble controller tests
2016-01-24 10:59:19 -05:00
Evert Timberg
d0b67c603b
Line and bar test updates
2016-01-24 10:58:30 -05:00
Evert Timberg
68ab74a46d
Fix linear scale stacked mode
2016-01-24 09:22:28 -05:00
Evert Timberg
0ed39c9fd7
Fix error in math helpers.
2016-01-24 09:21:10 -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
59e3ccb42a
buildOrUpdateControllers now returns an array of all the new controllers that were created. Build controllers before updating the scales but only reset them afterwards because the scales need to update label moments first.
2016-01-21 22:00:21 -05:00
Evert Timberg
2d4e2f9889
Properly begin path before drawing line at edge of scale
2016-01-18 21:35:35 -05:00
Evert Timberg
62988e9768
Merge pull request #1912 from mathiask88/pointStyleFix
...
Fixes the point size for rect and rectRot
2016-01-18 15:55:06 -05:00
Mathias Küsel
b282a01ab6
Fixes rect size
2016-01-18 20:04:31 +01:00
Mathias Küsel
33303d8d8a
Fixes resize() function
2016-01-18 17:46:11 +01:00
Evert Timberg
1de0435feb
Fix reversed ticks on linear scale + update test
2016-01-17 20:37:43 -05:00
Mathias Küsel
655c1152eb
Adds different point styles
2016-01-16 18:07:57 +01:00
Mathias Küsel
c42cb148da
Transition optimizations
2016-01-15 13:06:03 +01:00
Mathias Küsel
fa7baa1627
Do not calculate control points if we want straight lines
2016-01-15 13:05:51 +01:00
Mathias Küsel
19613f531c
Just assign instead of extend
2016-01-15 13:05:23 +01:00
Mathias Küsel
4f6e86640f
Adds a caching system to expensive measureText() function
2016-01-15 13:05:03 +01:00
Mathias Küsel
25d6c2f064
Removes unused context bindings
2016-01-14 18:17:14 +01:00
Evert Timberg
b756507625
Merge pull request #1887 from mathiask88/v2.0-dev
...
Add option to disable line drawing
2016-01-14 11:02:51 -05:00
Mathias Küsel
24e4a924c4
Add option to disable line drawing
2016-01-14 13:39:06 +01:00
Evert Timberg
7735371f45
Merge pull request #1893 from mathiask88/updateOptimizations
...
Add some optimizations to often used functions
2016-01-12 08:22:36 -05:00
Mathias Küsel
977d45a3e0
Add some optimizations to often used functions
2016-01-12 09:47:55 +01:00
Davis Kim
88fc6ecc5c
Fix orf/olf being undefined
2016-01-11 18:54:45 -08:00
Evert Timberg
0ed27d4474
Make sure tick string could be null / undefined
2016-01-09 14:42:55 -05:00
Evert Timberg
5070059ac1
Add template option for point labels + test + doc update
2016-01-09 14:39:43 -05:00
Evert Timberg
8c68f78ec3
Don't try to use undefined Scale constructors
2016-01-09 11:55:44 -05:00
Evert Timberg
0e393a3122
Update controllers
2016-01-09 09:50:56 -05:00
Evert Timberg
8cfa60c04d
Merge pull request #1854 from nnnick/fix/1853
...
Do not force resize if the size has not changed
2016-01-08 13:16:06 -05:00
Morley Zhi
203bbcec6c
Fix a bug where ticks get culled when they don't need to be
2016-01-07 15:57:53 -05:00
Morley Zhi
fe57c8728e
Re-enable this; turns out I was mislead by the label spacing
2016-01-07 12:41:42 -05:00
Morley Zhi
ebf695734c
Looks like maxTicksLimit already limits gridlines, so restore this
2016-01-07 12:37:13 -05:00
Morley Zhi
f00517643e
Always show the last tick
2016-01-07 12:28:09 -05:00
Morley Zhi
84a6eb4a3b
Updates
...
(1) Only limit gridlines when maxTicksLimit is defined, so we don't blow up the tests.
(2) Add a note about running tests in CONTRIBUTING.md
(3) Rebuild files
2016-01-07 11:40:26 -05:00
Morley Zhi
6478f93ded
Use ticks.maxTicksLimit to limit gridlines ( fixes #1859 ); use getValueOrDefault for resolving the maxTicksLimit option
2016-01-07 10:44:56 -05:00
Evert Timberg
310eada01a
Do not force resize if the size has not changed
2016-01-05 20:16:18 -05:00
etimberg
8dca052a16
Add suggestedMin, suggestedMax, min, and max options to radialLinear scale
2016-01-02 21:03:09 -05:00
Evert Timberg
579e322809
Merge pull request #1840 from nnnick/fix/1731-part-2
...
Better handling of large tooltips
2016-01-02 20:16:37 -05:00
etimberg
97cc714c94
Don't draw bars that represent data that is not valid (null, undefined, or NaN)
2015-12-31 19:32:03 -05:00
etimberg
a9a003c4c4
clean up helpers file before starting work
2015-12-31 18:41:21 -05:00
Evert Timberg
d9cc1219ce
Better handling of large tooltips
2015-12-29 12:58:53 -05:00
Evert Timberg
824f5880fb
Merge pull request #1837 from nnnick/fix/1766
...
Better fitting of scales
2015-12-29 10:16:46 -05:00
Evert Timberg
d6a27d8eb3
Clean up code
2015-12-29 09:56:55 -05:00
Evert Timberg
0c534e1eb8
Fix layout service
2015-12-29 09:07:01 -05:00
Evert Timberg
754268890b
Alias the pixel for nicer drawing
2015-12-28 09:37:31 -05:00
Evert Timberg
f2899934db
Draw line at edge of scales & update tests
2015-12-28 09:26:59 -05:00
etimberg
ff11975648
Fix issues identified in PR
2015-12-27 11:48:14 -05:00
Tore Lervik
a0c359ee80
min/max should have precedence over suggestedMin/suggestedMax
2015-12-25 13:53:09 +01:00
Tanner Linsley
31721a353c
Merge pull request #1829 from nnnick/fix/1716-1731
...
Better tooltip positioning
2015-12-23 10:22:34 -07:00
Evert Timberg
968a11a631
Merge pull request #1826 from hallatore/Bug_BezierCurveAtZero
...
Fixed bug with bezier still being used with tension set to 0
2015-12-23 09:39:21 -05:00
Tore Lervik
a1940caf91
Fixed build error bug with getting tension
2015-12-23 15:29:25 +01:00
Tore Lervik
ad67d1ecf8
Fixed bug with skipRatio check not being triggered correctly.
2015-12-23 13:42:24 +01:00
Tore Lervik
2c178a5670
Fixed bug with bezier still being used with tension set to 0
2015-12-23 13:36:44 +01:00
Evert Timberg
f170fd1b8d
Improvements to tooltip alignment to avoid the canvas edges
2015-12-22 21:35:23 -05:00
Evert Timberg
a423542775
Fix tests
2015-12-22 09:13:02 -05:00
Evert Timberg
fd668086b2
Merge pull request #1816 from hallatore/Bug_AutoSkip
...
Refactored skipRatio to use the longest label text for calculation.
2015-12-22 08:19:25 -05:00
Tore Lervik
d134394a1d
Refactored out property
2015-12-21 23:37:09 +01:00
Tore Lervik
cd02434943
Refactored skipRatio to use the longest label text for calculation.
2015-12-21 23:32:52 +01:00
Tore Lervik
c078ae15f0
Fixed a typo
2015-12-21 22:43:20 +01:00
Tore Lervik
86ca455cb6
Refactored firstTick null check
2015-12-21 22:40:33 +01:00
Tore Lervik
477fc72693
firstTick and lastTick can be null if the chart is empty.
2015-12-21 22:34:31 +01:00
Evert Timberg
d7643bf865
Initial refactor of tooltip code
2015-12-21 15:52:33 -05:00
Evert Timberg
d26ab24e3c
Show rectangle points at end of bars, even negative ones.
2015-12-21 15:52:19 -05: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
63b14dc2a9
Merge pull request #1810 from olyckne/fix/ticks_callback
...
Fix ticks callback and auto skip
2015-12-21 08:23:55 -05:00
Mattias Lyckne
7363c6fcbe
Dont set autoSkip false if userCallback is defined
...
”The reason being is that the user could replace either callback or
userCallbac”
2015-12-21 13:59:29 +01:00
Evert Timberg
bafd36b5ec
Fix sizing of tooltip when beforeBody or afterBody is very line
2015-12-20 18:48:44 -05:00
Evert Timberg
5f4e8a4c13
Merge pull request #1794 from nnnick/update-scale-lifecycle
...
Update Scale Lifcycle
2015-12-19 14:29:49 -05:00
Mattias Lyckne
23b2d991f7
disable autoSkip when there is a userCallback or autoSkip is set to false
2015-12-18 16:18:49 +01:00
Kriss
d9363d637a
maxRotation test is off by one
...
Most notable when maxRotation=0 and you end up with the text becoming non centred as it has rotated it by 1 and switched to right alligned mode.
2015-12-17 22:00:12 +00:00
Evert Timberg
283f1d7387
Update check to new system + fix tests
2015-12-17 09:31:01 -05: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
etimberg
8efa577ef5
Bar dataset controller needs a better way to know which datasets are bars since users could make their own bar types.
2015-12-15 20:13:37 -05:00
Evert Timberg
f51d7753bd
Update logarithmic algorithm
2015-12-15 19:18:18 -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
Evert Timberg
6d490fbbbb
Merge pull request #1779 from olyckne/adds_min_and_max_to_y_axes
...
Adds min and max setting to axes
2015-12-14 21:55:17 -05:00
Mattias Lyckne
968db4e783
Adds min and max setting to axes
2015-12-14 09:22:34 +01:00
Evert Timberg
139cbe1c64
All dataset controllers now inherit from a common base class Chart.DatasetController. This makes writing external controllers much easier
2015-12-13 14:35:40 -05:00
Evert Timberg
716e303230
Call animation callbacks. Created a sample file that shows their use by updating a progress bar during the animation. Updated the documentation to show how they are called.
2015-12-12 10:01:08 -05:00
Evert Timberg
95332e39f5
Merge branch 'v2.0-dev' into fix/1725
...
Conflicts:
src/core/core.controller.js
2015-12-12 09:01:59 -05:00
Evert Timberg
39e5daaca8
Better property picking. Added a helper function so we don't have to write a complicated ternary everywhere. Updated tests accordingly.
2015-12-12 08:52:06 -05:00
Derek Perkins
4add69432f
Merge pull request #1750 from nnnick/v2.0-legend
...
Legend and Title Support
2015-12-11 18:52:26 -07:00
Evert Timberg
7999aab26a
Fix up issues in core scale
2015-12-08 20:22:02 -05:00
Evert Timberg
d689e0fc47
When only the dataset array changes scales did not update correctly. This was due to the fact that the new datasets did not have scale IDs yet. By building the controllers first, the IDs are mapped if necessary. Then we can correctly update scales.
2015-12-08 19:57:58 -05:00
Evert Timberg
819f865723
Merge branch 'v2.0-dev' into v2.0-legend
...
Conflicts:
src/controllers/controller.doughnut.js
2015-12-07 22:10:38 -05:00
Evert Timberg
4f8f182d21
Better sizing when not displaying
2015-12-07 21:58:48 -05:00
Evert Timberg
a2e1a97382
Update docs + remove unused config option since we don't need 2 different callbacks.
2015-12-07 21:52:15 -05:00
Evert Timberg
60920cd75a
Polar area legend toggles data
2015-12-07 21:42:58 -05:00
Evert Timberg
59b7927994
Toggling of doughnut items now works
2015-12-07 21:23:20 -05:00
Evert Timberg
8befbbe8f0
Use config onClick function to toggle datasets for bars/lines/radar charts.
2015-12-07 20:36:44 -05:00
Evert Timberg
b0f69a1092
Generate nice legend boxes for all current chart types
2015-12-07 19:11:54 -05:00
Evert Timberg
ffa2870b56
Fix a few more issues in the tooltips
2015-12-07 18:23:51 -05:00
Evert Timberg
1cb7dde0d5
Start fixing code climate issues
2015-12-07 18:19:56 -05:00
Evert Timberg
20b9395585
Merge pull request #1745 from nnnick/fix/1710
...
Remove unused tooltip options
2015-12-07 17:46:49 -05:00
Evert Timberg
bffbaf6b37
Generate label strings using an option function. This allows new chart types to override
2015-12-06 12:53:45 -05:00
Evert Timberg
eba2fce923
Docs + move defaults to correct place.
2015-12-06 11:19:55 -05:00
Evert Timberg
792ee587ae
Split legend and title block functionality into 2 separate blocks. This allows the title to be on the top of the chart while the legend is on the bottom
2015-12-06 10:20:38 -05:00
Evert Timberg
eaf183352c
Polar are controller needs a similar update to the doughnut controller
2015-12-06 10:19:09 -05:00
Evert Timberg
7ab2a5ed9a
Remove unused xOffset property from the tooltip. Use the multiKeyBackground. Update documentation accordingly.
2015-12-06 09:38:19 -05:00
Evert Timberg
28fc6841f3
Add tooltipFormat option to time scale options.
...
Fix bars when displayed on a time scale.
Updated sample files.
2015-12-05 19:33:33 -05:00
Evert Timberg
0c247dde28
Gracefully handle setting options.animation
to false
which occurs when migrating configs from v1.
2015-12-05 10:40:05 -05:00
Evert Timberg
784fa78267
Merge pull request #1738 from nnnick/fix/1735
...
Call `beforeBody` and `afterBody` using the correct function.
2015-12-05 10:01:15 -05:00
Evert Timberg
d21b3c6d7e
Merge pull request #1741 from nnnick/fix/1706
...
Highlight correct items in dataset mode
2015-12-05 10:01:03 -05:00
Evert Timberg
2f1006c6de
Make sure we always have a valid end angle when reseting the model. Previously this was undefined and interpreted as 0 in the animation code.
2015-12-05 09:39:25 -05:00
Evert Timberg
744e1429b9
Label polar area and doughnut datasets
2015-12-04 20:32:18 -05:00
Evert Timberg
59fb1696a8
Highlight correct items when hover mode is set to 'dataset'
2015-12-04 20:01:04 -05:00
Evert Timberg
38afefde25
Doughnut controller needs to obey chart area size
2015-12-04 19:22:48 -05:00
Evert Timberg
d905f19355
Fix draw issue when radar chart dataset has 0 points and hence no children
2015-12-03 22:04:00 -05:00
Evert Timberg
0b260d57cc
Fix JSHint issue
2015-12-03 21:25:36 -05:00
Evert Timberg
dcc06eb3bb
Merge branch 'v2.0-dev' into v2.0-legend
...
Conflicts:
src/core/core.scaleService.js
2015-12-03 21:21:10 -05:00
Evert Timberg
0a92cf1b40
Call beforeBody
and afterBody
using the correct function.
2015-12-03 18:46:21 -05:00
Tanner Linsley
62bc4e42ec
Merge pull request #1736 from nnnick/umd-build
...
Umd build
2015-12-02 20:37:04 -07:00
etimberg
95a172df06
Remove old and stuff. Use the correct color variable instead of window.color
2015-12-02 22:15:03 -05:00
etimberg
40c8289ce8
Time scale uses moment loaded through UMD
2015-12-02 21:10:51 -05:00
Evert Timberg
14c2cf56d1
Merge pull request #1728 from ashayas/bugfix/1722
...
Realized minRotation not needed, removed as an option and removed from tests
2015-12-02 07:30:55 -05:00
npsecoding
164671ffeb
Realized minRotaion not needed, removed as an option and removed from tests
2015-12-01 22:29:19 -08:00
etimberg
25f061f340
Fix test failures
2015-12-01 21:07:53 -05:00
etimberg
bf277473c6
Update scale fitting to prevent horizontal scales from jumping around.
2015-12-01 21:01:13 -05:00
etimberg
6b3fd19fa9
Time scale will now scale units. For example, it will try 1hr then 2hrs then 3 hrs then 6 hrs then 12 hrs ... until it finds a unit that fits.
2015-12-01 20:02:44 -05:00
etimberg
f609452727
Allow the user to change the time label display formats
2015-11-30 20:42:48 -05:00
Evert Timberg
e91e6be851
Merge pull request #1696 from nnnick/fix/1688
...
When tooltip opacity is less than 1e-3, round to 0.
2015-11-29 10:16:25 -05:00
Evert Timberg
349586e14c
Merge pull request #1695 from nnnick/fix/consistent-display-parameters
...
Fix inconsistent display parameters
2015-11-29 10:16:20 -05:00
wuchangming
7aa2fd1af3
Bug in handler event.type='touchend'
...
In Chorme.
while event.type = "touchend” , event.touches is a empty TouchList,
event.touches.length === 0
2015-11-27 11:16:54 +08:00
Evert Timberg
55670b0cf7
When opacity is less than 1e-3, round to 0. IE11/Edge had problems with very small opacities on the order of 1e-10.
2015-11-25 19:31:26 -05:00
Evert Timberg
a90aac7b26
Change scale show
properties to display
and update tests
2015-11-24 19:18:15 -05:00
Cedric van Putten
ae51789c32
Stored pixel ratio in a variable with a fallback value for browsers that doesn't support window.devicePixelRatio
fixing rendering issues for IE10 and IE9. (issue #1622 )
2015-11-24 11:26:24 +01:00
etimberg
37abe74d43
Improve drawing when title is placed below legend boxes
2015-11-23 22:12:34 -05:00
etimberg
ea15aaaec2
Fix draw issue
2015-11-23 21:54:45 -05:00
Evert Timberg
10d056a4d1
Adds strikethrough of legend text when dataset is hidden
2015-11-23 21:04:41 -05:00
Evert Timberg
0d1f63e601
Update after legend toggle since scales may need to change
2015-11-23 19:03:24 -05:00
Evert Timberg
afc6d9094b
Allow clicking on legend text
2015-11-23 18:58:51 -05:00
Evert Timberg
60c1609ba9
Initial toggling of datasets from the legend.
...
Still need to do:
- clicking on text in legend
- toggling style of legend based on dataset style
- figure out if we need an
2015-11-22 22:31:08 -05:00
etimberg
0a17edd1ae
Minor improvement to code that gets active elements
2015-11-21 22:44:11 -05:00
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