Chart.js/src/scales
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
..
scale.category.js Non numeric y (#2849) 2016-07-09 09:22:25 -06:00
scale.linear.js Fix #2734 Cleanup unused variables 2016-06-18 11:00:11 +02:00
scale.linearbase.js Fix #2734 Cleanup unused variables 2016-06-18 11:00:11 +02:00
scale.logarithmic.js Fix #2734 Cleanup unused variables 2016-06-18 11:00:11 +02:00
scale.radialLinear.js 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
scale.time.js Fix out of bounds index access in getLabelMoment 2016-07-26 14:45:05 -04:00