Skip to content

Commit

Permalink
Fix variable name error on developer api documentation for
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Quach committed Jan 23, 2018
1 parent 274fca6 commit 8b5b6fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/developers/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ To get an item that was clicked on, `getElementAtEvent` can be used.

```javascript
function clickHandler(evt) {
var item = myChart.getElementAtEvent(evt)[0];
var firstPoint = myChart.getElementAtEvent(evt)[0];

if (item) {
if (firstPoint) {
var label = myChart.data.labels[firstPoint._index];
var value = myChart.data.datasets[firstPoint._datasetIndex].data[firstPoint._index];
}
Expand Down

0 comments on commit 8b5b6fd

Please sign in to comment.