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
2016-05-30 15:37:19 +00:00
2016-07-25 10:53:28 -04:00
2016-03-14 23:41:04 +00:00
2016-06-02 10:52:19 -04:00
2016-07-19 18:47:08 -04:00

Chart.js

Build Status Code Climate Coverage Status

Chart.js on Slack

Simple HTML5 Charts using the canvas element chartjs.org

Installation

You can download the latest version of Chart.js on GitHub or just use these Chart.js CDN links.

To install via npm:

npm install chart.js --save

To Install via bower, please follow these instructions.

Documentation

You can find documentation at www.chartjs.org/docs. The markdown files that build the site are available under /docs. Previous version documentation is available at www.chartjs.org/docs/#notes-previous-versions.

Contributing

Before submitting an issue or a pull request to the project, please take a moment to look over the contributing guidelines first.

For support using Chart.js, please post questions with the chartjs tag on Stack Overflow.

Building and Testing

To build, run gulp build.

To test, run gulp test.

To test against code standards, run gulp jshint.

More information on building and testing can be found in gulpfile.js.

Thanks to BrowserStack for allowing our team to test on thousands of browsers.

License

Chart.js is available under the MIT license.

Description
Languages
JavaScript 89%
TypeScript 10.6%
Shell 0.2%
HTML 0.2%