etimberg
904f19fb7e
When drawTicks is false, we should not include their size in the size of the axis
2016-08-22 20:09:09 -04:00
Evert Timberg
1749d90faf
Fix issues with repeated labels in the category scale and added a test to cover this case.
2016-08-22 18:03:56 -04:00
Evert Timberg
89531c6b93
Merge pull request #3112 from MatthieuRivaud/MonotoneCubicInterpolation
...
Monotone cubic interpolation
2016-08-22 17:53:31 -04:00
Karthik Iyengar
349a8a33ea
Added borderDash support for grid lines ( #3136 ) ( #3142 )
...
* Added borderDash support for grid lines (#3136 )
* Save and restore context to prevent border dash being applied to other elements
* Adds support for borderDashOffset, checks for setLineDash (IE9/IE10)
* Fixes tests
2016-08-12 12:31:54 -04:00
Ekaterina Dontsova
31197978b7
Fix #2966 : 0 values in logarithmic scale for line and vertical bar charts ( #3016 )
2016-08-11 21:40:25 +02:00
MatthieuRivaud
566ede1ecd
Fixed splineCurveMonotone unit test (for real this time)
2016-08-08 17:02:58 +02:00
MatthieuRivaud
ef66bf5e6d
Fixed splineCurveMonotone unit test
2016-08-08 16:33:32 +02:00
MatthieuRivaud
2409908027
Implement monotone cubic interpolation (see issue #3086 ).
2016-08-08 14:01:30 +02:00
Evert Timberg
d47ef17736
Handle the case where all points are skipped in a line
2016-07-30 14:46:28 -04:00
Evert Timberg
eb6124fea8
Fix 2 line drawing issues and add new tests for these cases
2016-07-30 12:55:42 -04:00
Evert Timberg
f60344dfdb
Fix line controller stacking with multiple axes and add a test
2016-07-28 18:10:07 -04:00
Evert Timberg
7ebc533cdc
Merge pull request #3028 from chartjs/fix/span-gaps
...
Refactoring of the line drawing function to make `spanGaps` work correctly
2016-07-28 18:02:56 -04:00
Ian Ker-Seymer
e4dd158b24
Fix out of bounds index access in getLabelMoment
...
Previously, calling getLabelMoment with an out of bound index would cause an
error such as this:
```
Uncaught TypeError: Cannot read property 'null' of undefined
```
This happens because there is not always guaranteed to be a labelMoment on
at the current datasetIndex.
One example of this is practice comes from a this function call:
```js
// since the are not always guaranteed to be at least two labelMoments
// \ / this index can be out of bounds
// |
var tickWidth = me.getPixelForTick(1) - me.getPixelForTick(0) - 6;
```
This patch simply ensures that the `labelMoments` for the `datasetIndex` are
defined before accessing properties on it.
2016-07-26 14:45:05 -04:00
Evert Timberg
2016630daa
Refactoring of the line drawing function to make spanGaps
work correctly. Added a lot more test conditions to the line element tests. Ensured that the line controller correctly calculated bezier control points when there was a point to be skipped
2016-07-24 18:12:36 -04:00
Evert Timberg
e94d3c0730
Merge pull request #2947 from chartjs/fix/524
...
Add polar area start angle setting
2016-07-19 18:56:09 -04:00
unknown
1a63113bc0
changed option name for radar chart from offsetAngle to startAngle. Added test to make sure correct angles are computed for all points in the radar chart (with and without startAngle option set).
2016-07-17 23:11:30 -06:00
Evert Timberg
bfa37e7d68
Merge pull request #2926 from chartjs/fix/2915
...
Fix bar and line controllers to convert strings to numbers when stacking
2016-07-13 18:22:11 -04:00
Evert Timberg
b6686f00f4
Non numeric y ( #2849 )
...
* Category scale can now read from the xLabels and yLabels properties.
* Update docs with section regarding the data object.
* Add sample file with non numeric Y and fix animations
2016-07-09 09:22:25 -06:00
Evert Timberg
a452094f5d
Add polar area start angle setting
2016-07-09 09:05:02 -04:00
Evert Timberg
7ca5f91b10
Fix bar and line controllers to convert strings to numbers when considering the values for stacking the chart. Simplified the base calculation for the bar charts and added test coverage to ensure that strings will work correctly.
2016-07-06 18:22:42 -04:00
Evert Timberg
44a9866bd8
Merge pull request #2870 from chartjs/fix/2802
...
Consider left and top when determining value from pixel in category s…
2016-07-06 17:53:50 -04:00
Shayne Linhart
0dccc85e3a
Added usePointStyle option to label boxes
...
- Closes #2252
- Allows label boxes to match the shape(pointStyle) of the corresponding data.
* Removed unused varaible from legend's draw()
2016-07-05 20:08:29 -06:00
Mitsuhiro Tanda
2bf2be7a9c
fix stacked scatter line chart
2016-06-30 22:28:21 +09:00
Evert Timberg
3660d9be39
Consider left and top when determining value from pixel in category scale
2016-06-29 07:00:09 -04:00
William Entriken
f2270ed8db
Merge pull request #2741 from duerahan/master
...
time type xAxis height crah in line chart #2622
2016-06-27 13:59:41 -04:00
Evert Timberg
48ac791a0c
Allow passing a value to the time scale getPixelForValue method
2016-06-21 19:03:30 -04:00
Simon Brunel
dfdbd4465c
Allow to register/unregister an array of plugins
...
The plugins service now accepts an array of plugin instances to register or unregister (for consistency, renamed `Chart.plugins.remove` to `unregister`). Also added a few methods to manipulate registered plugins, such as `count`, `getAll` and `clear` (mainly used by our unit tests).
2016-06-11 00:17:44 +02:00
Simon Brunel
a55c17d73f
Enhance plugin notification system
...
Change the plugin notification behavior: this method now returns false as soon as a plugin *explicitly* returns false, else returns true. Also, plugins are now called in their own scope (so remove the never used `scope` parameter).
2016-06-10 22:26:55 +02:00
Simon Brunel
7a419af4c2
Rename plugin service and notification method
...
Rename `Chart.pluginService` to `Chart.plugins` (so move the old Chart.plugins array as a private member of the service), and rename `notifyPlugins` to `notify` for consistency with other service methods.
2016-06-10 22:26:35 +02:00
Jack Valuntine
7d63bf085a
time type xAxis height crah in line chart
...
if input only one data in dataset and xAxis type is date make offset crash.
check offset value and don't devide 0 value.
Add xAxis check test case.
2016-06-09 13:34:15 +09:00
Jack Valentine
99d3f423cb
titleColor options is not available
...
titleColor change to titleFontColor
2016-06-08 23:15:21 +09:00
Jack Valentine
d6e5b5e79a
core tooltip test case fixe
...
titleColor options is not available
titleColor change to titleFontColor
2016-06-08 23:01:41 +09:00
문승찬
5687aa479f
Fix tooltip core test case
...
Change tooltip font color options
this options changed in tooltip core
bodyColor -> bodyFontColor
titleColor -> titleFontColor
footerColor -> footerFontColor
2016-06-08 10:22:47 +09:00
Tarqwyn
e856dda04f
Suggested changes from PR review
...
Changes to be committed:
modified: docs/02-Scales.md
modified: src/core/core.helpers.js
modified: src/core/core.scale.js
modified: test/core.helpers.tests.js
2016-06-03 20:15:29 +01:00
Evert Timberg
a5167cc42d
Reduce duplicated code in doughnut controller
2016-05-30 21:33:11 -04:00
Evert Timberg
6bc917c8e3
Improve testing on the CI
2016-05-28 21:08:20 -04:00
Evert Timberg
b646f6d816
Add a way of sorting tooltip items with a custom sort function
2016-05-28 20:47:36 -04:00
Evert Timberg
8d20379e29
Initial tooltip tests + fix a bug when the tooltip beforeLabel and afterLabel callbacks returned strings
2016-05-28 15:26:46 -04:00
Evert Timberg
528680d666
Merge pull request #2658 from chartjs/fix/2580
...
Allow turning off lines on a per dataset basis
2016-05-28 10:56:25 -04:00
Evert Timberg
327b8d82f5
Allow turning off lines on a per dataset basis
2016-05-27 22:20:51 -04:00
Evert Timberg
b3f8a53ea5
Merge pull request #2640 from chartjs/legend-and-title-as-plugins
...
Legend and title as plugins
2016-05-27 21:19:28 -04:00
Evert Timberg
cca4c76c00
Don't use translates and rotates for drawing rotated rectangles
2016-05-26 19:38:27 -04:00
Evert Timberg
ae01f1726c
Fix tests
2016-05-26 19:22:11 -04:00
Ceane Lamerez
456ab9ca36
Fix #2574 - Add support to hide border on the chart
2016-05-17 21:35:19 +02:00
Evert Timberg
8c209405e9
Merge branch 'iso_weekday' of https://github.com/tomduncalf/Chart.js into tomduncalf-iso_weekday
...
Conflicts:
docs/01-Scales.md
2016-05-12 18:24:14 -04:00
Evert Timberg
41c043dd23
Merge branch 'master' of https://github.com/nnnick/Chart.js
...
Conflicts:
docs/01-Scales.md
2016-05-12 18:22:55 -04:00
Evert Timberg
47f770c3ef
Merge pull request #2524 from ashiguruma/master
...
Allow canvas patterns instead of colors
2016-05-12 18:20:40 -04:00
Tom Duncalf
7ee5af81af
Add labelOffset option to scales
2016-05-11 10:43:22 +01:00
Tom Duncalf
8b3d079a50
Add isoWeekday option to allow time scale ticks in 'week' unit mode to start on a specified day of the week
2016-05-11 09:44:02 +01:00
Tom Duncalf
3bef974c25
Add minRotation support
2016-05-10 12:33:36 +01:00
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
Evert Timberg
bc505b1a9d
beginAtZero and linear scales with no data should play nice
2016-05-07 16:56:04 -04:00
Evert Timberg
fc4c23c8d2
Allow updating scale defaults
2016-05-07 11:43:24 -04:00
Evert Timberg
4068836a42
Reduce core.title.js size
2016-05-04 21:08:59 -04:00
Evert Timberg
38373300ee
Improve time scale for zoom and pan
...
* Improve time scale for zoom and pan
Improve category scale when zoomed
* Fix CI test
2016-05-01 11:40:14 -05:00
Evert Timberg
cb54f30c97
Implement getValueForPixel for category scale
2016-04-30 08:39:18 -04:00
Evert Timberg
56411bdcd4
Increase tolerance for CI
2016-04-29 20:07:42 -04:00
Evert Timberg
6df9b24ecd
Merge from feature/pan-support
...
All tests are passing
2016-04-29 20:03:15 -04:00
Evert Timberg
115358659a
Merge pull request #2411 from zachpanz88/shared-data
...
Update line tests to match new metadata system
2016-04-28 18:36:43 -04:00
Zach Panzarino
4b96acc685
Change spaces to tabs in line tests
2016-04-28 22:30:19 +00:00
Evert Timberg
73bc52f196
Update radial linear tests
2016-04-28 18:28:57 -04:00
zachpanz88
da46850ccf
Rewrite line chart tests to match new metadata structure
2016-04-28 18:21:56 -04:00
Evert Timberg
9fe9305992
Reenable time scale tests
2016-04-27 21:50:31 -04:00
Evert Timberg
7aa1463c15
Remove bad tests from linear scale
2016-04-27 21:24:13 -04:00
Evert Timberg
5c146a9da5
Linear scale tests
2016-04-27 21:19:02 -04:00
Evert Timberg
2253e84c47
Numerical improvements to matcher
2016-04-27 19:46:15 -04:00
Evert Timberg
1e066ea5de
Minor test fix
2016-04-27 19:04:00 -04:00
Evert Timberg
405fda6655
Fix radar tests & reenable. support new lineTension attribute like line controller
2016-04-27 19:03:52 -04:00
Evert Timberg
34992bc4cb
Fix doughnut test
2016-04-27 17:40:56 -04:00
Evert Timberg
03fb66751f
Make animation options consistent for polar area and doughnut charts ( #2342 )
...
* Make animation options consistent and fix an issue when `animateRotate === false` in the polar area chart
* Update docs for moved options
* Fix typo
2016-04-27 16:07:21 -05:00
Evert Timberg
450a08420b
Merge pull request #2371 from chartjs/fix-time-scale-cutoff-bug
...
Time scale now compensates for rounded tick units
2016-04-27 15:39:02 -04:00
Simon Brunel
eb14481d02
Fix legend tests and disable other failing tests
2016-04-27 19:58:36 +02:00
Simon Brunel
a93b3f45ac
Fix helpers, layoutService and logarithmic tests
2016-04-26 22:44:53 +02:00
Simon Brunel
e0353dac98
Fix bar, bubble, doughnut, and polarArea tests
...
Also replace the 2 spaces indentation in controller.bar.tests.js by tabs to match the overall code style.
2016-04-26 12:46:34 +02:00
Simon Brunel
8b156bdc98
New toBeCloseToPixel jasmine matcher
...
Because of differences between testing platforms, introduce a new matcher for (floating) pixel values comparison (currently 2 pixels tolerance).
2016-04-26 12:46:33 +02:00
Simon Brunel
886956441e
New test helpers to acquire and release charts
...
Since we changed the way how meta data are stores, now unit tests need to work on real Chart instances. This commit brings some helpers to inject/cleanup HTML canvas and it's wrapper into/from the DOM.
2016-04-26 12:46:31 +02:00
Tanner Linsley
da90e2f670
Time scale now compensates for rounded tick units
...
Closes #2277
2016-04-25 17:48:21 -05:00
Evert Timberg
f613ad5c0f
Comment out tests since they seem like a moment issue
2016-04-23 20:08:00 -04:00
Evert Timberg
b4a06f6e34
Merge branch 'master' into feature/pan-support
...
Conflicts:
src/core/core.controller.js
2016-04-23 20:06:18 -04:00
Evert Timberg
c31c90b2e4
Backwards pixel to value API
2016-04-23 13:27:10 -04:00
Jannis Achstetter
75676019a1
Add testcases for the consistent dataset-specific option names "pointRadius" and "pointHitRadius"
2016-04-21 15:39:19 +02:00
Evert Timberg
bc90aaa522
Start on pan support
2016-04-21 07:48:47 -04:00
Jannis Achstetter
add9f8c3a4
Add a testcase for the new option name "lineTension"
2016-04-21 09:41:27 +02:00
Jannis Achstetter
b0c1e9cb69
"tension" is a property of the line, not of the point
2016-04-21 09:17:51 +02:00
Jannis Achstetter
6fcec4273e
Fix test/defaultConfig.tests.js after PR #2308
2016-04-20 16:02:05 +02:00
Evert Timberg
d131e7d07a
Use apply instead of call so that the animation easing can be passed to the draw callbacks
2016-04-17 12:25:47 -04:00
Evert Timberg
16570b0c0c
Plugin system + tests
2016-04-17 12:02:33 -04:00
Evert Timberg
7c7739c25f
Merge pull request #2276 from nnnick/fix/2229
...
Improved sizing when grid lines are not display
2016-04-17 10:38:45 -04:00
Evert Timberg
1a49872ce4
More prework for zoom/pan
2016-04-17 10:33:38 -04:00
Evert Timberg
73b6198d24
Fix tests
2016-04-17 08:54:27 -04:00
Evert Timberg
ca461479a8
Update docs
2016-04-16 21:50:45 -04:00
Evert Timberg
fac92448ff
Update tests for new config option
2016-04-16 21:49:08 -04:00
Evert Timberg
b50c281684
Merge pull request #2273 from mdehoog/doughnut-rotation
...
Added unit test for doughnut rotation/circumference, fix for rotation = 0
2016-04-16 19:21:58 -04:00
Michael de Hoog
241f085533
Fix for doughnut rotation = 0, added unit test for doughnut rotation/circumference properties
2016-04-17 09:16:42 +10:00
Tanner Linsley
4f60eecc01
Better default tick rotation and tick autoskip settings ( #2258 )
...
* Better default tick rotation and tick autoskip settings
* scale.time: Use ctx to measure label, and <= instead of < for unit fitting
* Test Changes
* Passing Tests with new defaults
2016-04-16 17:38:03 -05: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
d5fd737058
Merge pull request #2206 from nnnick/fix/constraint-width-percent
...
Allow percentages as the max-width/max-height of the container
2016-04-03 13:18:06 -04:00
Evert Timberg
9ee70d6d48
Category scale supports min / max
2016-04-02 23:05:48 -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