Commit Graph

989 Commits

Author SHA1 Message Date
Ekaterina Dontsova
6408ba426c Fix #3022 Multi-lines label alignment (#3239) 2016-09-03 00:26:02 +02:00
Ekaterina Dontsova
4a4dccd6c1 Fix #3044 Line chart single data point centering (#3166)
In line charts, when there is only one label and data point, both are now horizontally centered.
2016-08-25 18:52:12 +02:00
Evert Timberg
8afac7bd3c Merge pull request #3191 from chartjs/fix/2994
Fix issues with repeated labels in the category scale and added a tes…
2016-08-23 17:09:31 -04:00
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
b33aff2091 Merge pull request #3131 from Lighnat0r/master
Use parser options in getPixelForValue for time scale
2016-08-22 17:53:55 -04:00
Evert Timberg
89531c6b93 Merge pull request #3112 from MatthieuRivaud/MonotoneCubicInterpolation
Monotone cubic interpolation
2016-08-22 17:53:31 -04:00
Evert Timberg
c94673e55a Merge pull request #3128 from vermeeca/3127-tooltip-sort
Accept chart data to itemSort callback for Tooltips
2016-08-22 17:53:11 -04:00
Tomasz Moń
c283867f73 Remove smallestLabelSeparation from TimeScale (#3186)
In case of charts with over 4000 points, smallestLabelSeparation
calculation contributes significantly to total cpu usage (about 25% according
to built-in Chrome profiler). Important thing to note is that result
of this calculation is not used at all.

Related commits:
  * 677c249b61
    introduced smallestLabelSeparation. It was used in calculateBaseWidth
    function.
  * d198157fb8
    removed last use of smallestLabelSeparation. Since then the calculated
    value was never used.
2016-08-22 14:50:48 -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
Lighnat0r
ff0e8eadab Use parser options in getPixelForValue for time scale 2016-08-10 19:14:02 +02:00
Craig Vermeer
88de438c0e 3127 - Modify the itemSort callback for tooltips to accept a third parameter of the data object passed to the chart 2016-08-10 09:54:21 -04:00
Evert Timberg
5fea5a1156 Merge pull request #3094 from chartjs/fix/3090
Make the iframe not focusable by using tabIndex of -1
2016-08-09 23:00:50 -04:00
Zach Panzarino
c20d391b49 Remove empty if statement in element.line.js 2016-08-10 01:39:03 +00:00
Zach Panzarino
abfbdd5f31 Remove unneeded trailing commas 2016-08-10 01:35:34 +00:00
MatthieuRivaud
7635ab4a4e Calling |helpers.sign| instead of |Math.sign| directly for IE and Safari compatibility. 2016-08-09 09:32:10 +02:00
MatthieuRivaud
3869dd110a Fix spanGaps probing in updateBezierControlPoints 2016-08-09 09:28:09 +02:00
MatthieuRivaud
4aabc0cb82 Recovered a fix lost when branching. 2016-08-08 15:56:53 +02:00
MatthieuRivaud
d06fbc772f - Added dataset option |cubicInterpolationMode| to allow for curves with different interpolation modes on the same graph (updated doc accordingly)
- Added new sample file to demonstrate the monotone cubic interpolation mode
- Fixed a typo in a comment in updateBezierControlPoints
2016-08-08 15:35:46 +02:00
MatthieuRivaud
2409908027 Implement monotone cubic interpolation (see issue #3086). 2016-08-08 14:01:30 +02:00
Evert Timberg
554f31a1bb Make the iframe not focusable by using tabIndex of -1 2016-08-04 18:55:32 -04: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
cec8d8b7d5 Merge pull request #3064 from chartjs/fix/2560
Recalculate the size of the scale in units when the end point is chan…
2016-07-30 12:59:59 -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
b86e42f2ae Fix JS Hint warning 2016-07-30 11:33:59 -04:00
Evert Timberg
0bb2e478db Recalculate the size of the scale in units when the end point is changed. 2016-07-30 11:06:13 -04:00
Evert Timberg
51518a7149 Handle possibility of a undefined arc element in the doughnut chart 2016-07-30 09:41:35 -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
Evert Timberg
23ca08184e Merge pull request #3045 from IonutLaceanu/master
getElementAtEvent: enforce one element limit
2016-07-28 18:02:31 -04:00
Jeff Esp
1e5cdc6188 Fix #2922 Make the XAxis based hover/tooltip pick the item at the same x-axis value 2016-07-27 21:09:13 +02:00
Ionut Laceanu
f46a9472b5 getElementAtEvent: enforce one element limit 2016-07-27 19:27:08 +03: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
47b5ad60ae Fix JSHint warnings 2016-07-24 18:21:24 -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
Evert Timberg
88d9398982 Merge pull request #2984 from slinhart/master
Issue #1012. Added offsetAngle option for radar charts.
2016-07-18 22:25:54 -04:00
Tiago Roldão
9df06e8c2e Check for existence of data element before accessing property 2016-07-18 22:05:44 +01: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
unknown
d7733b2221 Merge remote-tracking branch 'chartjs-origin/master' 2016-07-16 18:59:22 -06:00
unknown
ad7ed249af Add an option for radar chart to have offsetAngle. Issue #1012 2016-07-16 18:58:04 -06:00
Evert Timberg
7930137afa Merge pull request #2925 from Joshuabaker2/master
Ability to manually set bar chart bar width
2016-07-16 14:46:59 -04: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
3dd15f64d2 Merge pull request #2918 from chartjs/fix/2916
Fix time point lines. Improved logic for using the value in the time …
2016-07-13 18:21:57 -04:00
Josh Baker
191c280387 Added support for manually specifying bar thickness in bar charts 2016-07-12 17:31:50 -07:00
Evert Timberg
524493fe06 Merge pull request #2883 from Mesonyx/mesonyx/bugfix/null-tooltips
Fix for null value label/x-axis multi-tooltip bug
2016-07-11 10:34:20 -04:00
Evert Timberg
49c4169010 Bring back capping of bezier curve points and have an option to disable it (#2948) 2016-07-09 15:24:41 -06: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
72813d5112 Merge branch 'amlethojalen-master' 2016-07-09 10:02:08 -04:00