Tommie Jones
Tommie Jones

Reputation: 1011

On plothover in flot display all corresponding datapoints for all series on selected item

I am using the flot jquery graphing library. Looking at online examples I am able to use plothover to display a tool tip whenever I hover over a paticular point. However my graph has multiple series. And I want the tooltip to display data values for all series on the selected x coordinate. Any suggestions on how to do this?

Upvotes: 0

Views: 2894

Answers (1)

wwv
wwv

Reputation: 911

You can use the item.dataIndex property in your plothover handler.

It's the X coordinate of the selected point, and you can use that to get the Y coordinate from the other series.

DEMO

Upvotes: 2

Related Questions