Tom Loudon
170fdab6a6
Removed 'background' from hover color helper name.
...
Patterns could be used for style attributes other than background e.g. stroke. Updates chartjs/Chart.js#1323
2016-05-09 07:29:52 +01:00
Tom Loudon
5866f73562
Added helper to allow a CanvasPattern for hover. Updates chartjs/Chart.js#1323
...
When a hover background isn't specified in the config for a chart a modified version of the default color is used. If the background color is a CanvasPattern object an error is triggered.
With this change the default background color will no longer be modified if it is a CanvasPattern.
2016-05-07 22:24:00 +01:00
Simon Brunel
82b1e5cd99
Handle effective dataset visibility per chart
...
Introduced a new meta.hidden 3 states flag (null|true|false) to be able to override dataset.hidden when interacting with the chart (i.e., true or false to ignore the dataset.hidden value). This is required in order to be able to correctly share dataset.hidden between multiple charts.
For example: 2 charts are sharing the same data and dataset.hidden is initially false: the dataset will be displayed on both charts because meta.hidden is null. If the user clicks the legend of the first chart, meta.hidden is changed to true and the dataset is only hidden on the first chart. If dataset.hidden changes, only the second chart will have the dataset visibility updated and that until the user click again on the first chart legend, switching the meta.hidden to null.
2016-04-26 12:46:27 +02:00
Simon Brunel
51aa9b4a27
Allow multiple charts sharing the same data
...
Meta info are now scoped by chart and moved under the dataset._meta map { chart.id -> meta }. Meta for a specific chart (and dataset) can be accessed using chart.getDatasetMeta(datasetIndex) or from the dataset controller using getMeta(). Note that helpers.uid() now generates an int (instead of a string) to make lookups in the _meta map faster.
2016-04-26 12:46:24 +02:00
Tom Duncalf
0c854dd40c
Allow gradients to be used as colors without causing errors when e.g. calling the color helper to generate the defualt colour value for hover
2016-04-13 09:46:39 +01:00
Evert Timberg
68b493732c
Don't measure undefined or null strings.
2016-04-10 10:10:31 -04:00
Evert Timberg
3350d5fb13
Refactoring to reduce code size
2016-04-02 09:19:33 -04:00
Evert Timberg
b6d7ceba1c
Add initial implementation of constraint percentage width / height support. Added tests for dom sizing methods.
2016-04-01 23:11:01 -04:00
etimberg
79f38b49d8
Fix scale merge when the xAxes object is specified but the type is not
2016-03-20 11:12:26 -04:00
Evert Timberg
e090691ef7
Better use of default scale types.
2016-03-19 08:50:50 -04:00
Evert Timberg
04f1e57459
Fix zoom reset
2016-03-15 20:03:28 -04:00
Evert Timberg
4fec7dfdbb
Fix animation bug. Helpers.findNextWhere no longer returned the index of the item. This causes the wrong animation object to be removed.
2016-03-13 12:24:33 -04:00
Evert Timberg
185ea3939d
Take padding into account when determining the model coordinates from event coordinates
2016-02-28 15:32:15 -05:00
Mathias Küsel
96315dd3c9
Much faster cache clean up
2016-02-27 17:19:33 +01:00
etimberg
01b88f19df
Clean up code climate style issues and formatting.
2016-02-14 17:06:00 -05:00
etimberg
f6951816a0
Improve joshing reporting. Added a JSHint config file.
...
Fixed JSHint warnings.
2016-02-13 20:12:26 -05:00
Tanner Linsley
813d18bd78
Passing All Tests, Updated Dependencies
2016-02-11 23:16:43 -07:00
Tanner Linsley
f2780bb825
Browserify for easier UMD consumptions and vanilla builds
2016-02-11 20:30:53 -07:00
Robert Becker
e9c18f603d
Merged remote-tracking branch 'upstream/v2.0-dev' into v2.0-dev to fix conflicts.
...
Refactored linear scale fixed step size implementation.
Added nbproject to .gitignore
2016-02-09 12:56:16 +01:00
Evert Timberg
61ca178e2b
Write an almost equals function and use it in the linear scale. Added a test for this new function.
2016-02-06 09:38:44 -05:00
Robert Becker
1692b977cd
Fixed tab sizing in core.helpers.js
2016-02-05 09:43:20 +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
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
Mathias Küsel
4f6e86640f
Adds a caching system to expensive measureText() function
2016-01-15 13:05:03 +01:00
Mathias Küsel
977d45a3e0
Add some optimizations to often used functions
2016-01-12 09:47:55 +01:00
etimberg
a9a003c4c4
clean up helpers file before starting work
2015-12-31 18:41:21 -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
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
etimberg
95a172df06
Remove old and stuff. Use the correct color variable instead of window.color
2015-12-02 22:15:03 -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
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
Evert Timberg
55c7d6872a
Prevent NaN results when previous, point, and next are all the same
2015-11-14 22:49:08 -05:00
Tanner Linsley
9d540cebb6
SplineCurve function now graciously handles skipped points
2015-10-23 16:36:33 -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
Ryan Mitchell
ef1c4fb0cb
Fix typo in core.helpers.js
2015-10-22 12:41:03 -04:00
etimberg
e46a2cb074
Fix JSHint errors
2015-10-20 20:33:51 -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
Lucas Styles
4a48e19cac
Fix HTMLIframeElement remove/removeNode issue in removeResizeListener method
2015-10-17 00:35:47 +01: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
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
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
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
162aaa993a
Convert screen coordinates into canvas coordinates when dealing with mouse events
2015-09-20 17:57:27 -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
Evert Timberg
97cec8604a
Only store the original device context ratio once
2015-09-18 19:22:54 -04:00