Commit Graph

2205 Commits

Author SHA1 Message Date
Christopher Moeller
97f6c8f12d Add rectRounded point style 2016-11-26 12:58:49 -05:00
etimberg
2e5df0ff42 Allow updating the config of a chart at runtime 2016-11-25 07:19:59 -05:00
Evert Timberg
7e5e29e3ee Improve radial scale (#3625)
Clean up radial linear scale. It now supports multiple lines for point labels. Fixes #3225
2016-11-25 07:19:43 -05:00
Jeff Carey
fe68b77606 Upgraded dependency gulp-uglify to 2.0.0 (#3635) 2016-11-22 23:51:22 +01:00
etimberg
68b00b2dc5 Labels can get bigger when the 2nd fit happens. Don't arbitrarily force the size to change 2016-11-20 13:49:44 -05:00
etimberg
58afbe428c Properly use the ticks.padding option. To correctly fix the issue, the default padding was changed from 0 to 10. This change caused all of the test changes since the width of a vertical scale was lowered by 10px 2016-11-20 11:52:08 -05:00
Jerry Chang
4fbb1bdbbc Fixed Issue with tooltip label display when given null data value (#3528)
When datasets.data contains a null value, the label displays incorrect
value.

code additions:
- unit tests for truthy label values (when data is null)
- checks to ensure handling of null value in getLabelByIndex method

added mock data sets from issue #3528 example

expect the return value from getLabelForIndex method to be valid (truthy)

added check for null of first data value in getLabelForIndex

fixed indentation and null comparison operator in code

fixed mistake in definition of firstData variable

changed testing for data on index 0 to using index variable

changed firstData to use value instead

condense the statments to use value variable
2016-11-19 09:29:15 -05:00
etimberg
48cb8b78e7 Remove unnecessary padding usages and update category scale tests 2016-11-18 17:58:07 -05:00
Evert Timberg
5dd1c77cf5 Take vertical padding into account 2016-11-18 17:58:07 -05:00
Evert Timberg
eaf109c2b1 When an axis needs padding due to a long, rotated, label it should be added inside the layout system rather than in each axis. 2016-11-18 17:58:07 -05:00
Jeff Carey
fd2e40ce11 Fixed vertical alignment in legend text (#3387) 2016-11-18 07:35:31 -05:00
etimberg
f7d60c2606 Allow line chart to use pointBorderWidth of 0 correctly 2016-11-17 21:05:47 -05:00
Jonathon Hill
0b4123b92c Update the documentation plugin list (#3610)
Add chartjs-plugin-draggable to the list of plugins, update existing ones recently renamed and re-order the list by names.
2016-11-17 10:29:36 +01:00
38elements
afab387cc1 Fix link in 01-Chart-Configuration.md (#3607) 2016-11-16 07:21:44 -05:00
etimberg
339265d21e use correct option for setting tension on radar charts 2016-11-14 07:27:01 -05:00
etimberg
3985d50201 use correct option in radar chart 2016-11-13 19:49:13 -05:00
Evert Timberg
68a2c8240f remove unused cancel animation frame method 2016-11-13 08:16:40 -05:00
38elements
9ac0293b1a Fix path in 09-Advanced.md 2016-11-12 21:43:58 -05:00
etimberg
3f2d7efc70 Add a function to filter items out of the legend 2016-11-12 18:48:25 -05:00
Simon Brunel
6b449a9e7c Fix retina scale when display size is implicit
The retinaScale helper now enforces the display size to the correct values because if no style has been set on the canvas, the render size is used as display size, making the chart bigger (or smaller) when deviceAspectRatio is different of 1.
2016-11-11 18:10:19 -05:00
Simon Brunel
efced4780c Fix context state restoration on destroy
In many cases, the canvas render size is changed by the lib, causing the state stack to be discarded, meaning that we can't use save() and restore() to release the context with its initial state (i.e. before creating the chart). Since we don't need (want) to manually save / restore the context initial state, simply make sure to reset it to the default state to give a fresh context back to the user. That also means we don't need to revert the scale when the pixel device ratio is not 1.
2016-11-07 19:16:45 -05:00
Simon Brunel
040b0e160d Bump version to 2.4.0 2016-11-06 18:31:30 +01:00
etimberg
74d4dbc608 X and Y interaction modes now use the intersect option 2016-11-05 08:19:07 -04:00
Simon Brunel
a94885e32d Fix the event handler when legend is disabled (#3544)
When legend is disabled (i.e. {options: {legend: false}}), me.legend is null. Add the same test on me.tooltip even if the tooltip object is always created in case of {options: {tooltips: false}}.
2016-11-03 22:43:52 +01:00
Simon Brunel
5012dcbdae Fix iframe resize handler when re-attached to DOM (#3527)
When the iframe is attached to the DOM, its content is reloaded (invaliding the resize listener) so make sure to install the handler after the iframe is loaded. Optimize resize events by throttling resize process until the next animation frame. Rewrite the unit test "waitForResize" method, the previous one (timeout) was too weak and most tests was failing on FF.
2016-10-31 08:47:28 +01:00
etimberg
f288bc727b When an event triggers an update while the bufferedUpdate state is true, we need to do that render with priority over any other renders that take place for animations and tooltips 2016-10-30 16:58:40 -05:00
Simon Brunel
e90edd8c9a Bump ESLint to v3.x (gulp and Code Climate) (#3526) 2016-10-29 18:40:27 +02:00
Josh Soref
67934920be Spelling fixes (#3522)
Including: actually, aspect, bottom, changes, characters, datasets, divisible, downward, guidelines, instance, instances, interrupted, item, javascript, label, lifecycle, lines, plugins, manually, milliseconds, nearest, occurring, position, predefined, recalculate, tooltip, those
2016-10-27 21:18:31 +02:00
Varatep Buranintu
7c8998f96a fix "area" typo 2016-10-26 20:23:51 -05:00
bret b
295c9db1df Fixes issue #3490: Tick documentation is missing autoSkipPadding
Adding a single line to the docs to document autoSkipPadding.
2016-10-25 17:28:13 -05:00
Zach Panzarino
99041de31a Update installation instructions in README 2016-10-25 15:04:58 +00:00
Evert Timberg
80bd08bef9 Update chartColors.js to utils.js and move randomScalingFactor function there 2016-10-23 16:33:25 -05:00
etimberg
274aa290ca Fix bug in 'y' tooltip mode 2016-10-23 16:33:25 -05:00
etimberg
9ad9cd2154 Reorganized sample files into sub directories. Added a helper containing colours that should be used by all samples.
I added new samples to explain behaviour and modified all samples to have consistent styling. In updating the samples,
I removed the use of jQuery and instead use standard methods.

For the custom tooltip samples, I updated the styling to show color boxes like the regular tooltips.
2016-10-23 16:33:25 -05:00
etimberg
5ae268e942 Add a way to filter items in the tooltip 2016-10-23 16:33:08 -05:00
bydooweedoo
3bd4d283f7 Custom tooltip: add data points infos (#3201)
Expose tooltip items from tooltip model and added `x` and `y` properties to `TooltipItemInterface`
2016-10-19 08:48:17 -05:00
etimberg
a0388eff4c Add new properties for the caretX,caretY point of a tooltip. Useful for custom tooltips.
The custom tooltip sample was updated as well to use the new properties.
2016-10-19 06:30:41 -05:00
Zach Panzarino
a0ce74643f Fix eslint errors in layout service test 2016-10-18 22:00:55 +00:00
etimberg
596ff3718c Layout service now supports configurable padding on left, top, right and bottom.
Re-enabled the layout service tests and then properly disabled the tests that
fail on the CI.
2016-10-17 16:59:47 -05:00
etimberg
16f23b2c44 Add reset method to chart prototype 2016-10-17 06:40:29 -05:00
Zach Panzarino
766ca49cd0 Extend eslint to test files (#3473)
* Add eslint to test files

* Fix mockContext for tests

* Make formatting look better for nested objects
2016-10-16 17:34:59 -04:00
Simon Brunel
4a5b5a0e7e Enhance context acquisition on chart creation
Add support for creating a chart from the canvas id and prevent exceptions, at construction time, when the given item doesn't provide a valid CanvasRenderingContext2D or when the getContext API is not accessible (e.g. undefined by add-ons to prevent fingerprinting). New jasmine matcher to verify chart validity.
2016-10-16 08:25:13 -05:00
Evert Timberg
6ec6a929f0 Make index mode only work with the horizontal distance to an element (#3471)
Make index mode only work with the horizontal distance to an element if intersect is off
2016-10-15 16:49:35 -05:00
Evert Timberg
a86c47cf48 Configurable Tooltip Position Modes (#3453)
Adds new tooltip position option that allows configuring where a tooltip is displayed on the graph in relation to the elements that appear in it
2016-10-14 16:36:49 -05:00
etimberg
3365ba6d29 Bar chart performance improvements 2016-10-14 06:20:08 -05:00
Evert Timberg
f8e90b1c2d New fill modes for lines (#3460)
New fill modes for lines allowing the user to customize where the fill goes to
2016-10-14 06:19:47 -05:00
Simon Brunel
f481746fe1 Update the GitHub issue template 2016-10-11 07:42:26 -04:00
etimberg
0817199f45 No longer merge arrays during the config merge. Simply replace the property 2016-10-10 08:14:58 -04:00
Tieson Trowbridge
c61ab012c4 Replaces Unicode character with HTML entity 2016-10-09 12:34:35 -04:00
Evert Timberg
d21a853f30 Fix/3061 (#3446)
Solve weird animation issues with the tooltip. The optimization in Chart.Element.transition when the animation finishes to set `_view = _model` caused problems during update because we were using `helpers.extend` all over the place.

I changed to code so that we regenerate the model variable rather than continuously extending the old version. I also removed unnecessary tooltip reinitializations from the controller which should improve overall performance during interaction.
2016-10-09 12:26:59 -04:00