Skip to content
This repository has been archived by the owner on Jul 19, 2019. It is now read-only.

fix tooltip when chart updated #224

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,10 @@ var updatePoints = function(nextProps, chart, dataKey) {

var addData = function(nextProps, chart, setIndex, pointIndex) {
var values = [];
var labels = [];
nextProps.data.datasets.forEach(function(set) {
values.push(set.data[pointIndex]);
labels.push(set.data[pointIndex]);
});
chart.addData(values, nextProps.data.labels[setIndex]);
chart.addData(values, labels);
};