make tooltipPlugin more generic for further use

This commit is contained in:
Nick Krecklow
2020-05-11 00:42:02 -05:00
parent 1ff9478988
commit 9987434fea
3 changed files with 4 additions and 8 deletions

View File

@ -20,11 +20,7 @@ export function uPlotTooltipPlugin (onHover) {
onHover({
left: bounds.left + left + window.pageXOffset,
top: bounds.top + top + window.pageYOffset
}, {
idx,
x: u.data[0][idx],
y: u.data[1][idx]
})
}, idx, u)
}
}
}