开发者

Tooltip on area under a plotted line with stacked area chart

I have a stacked area chart (an example is included below) where I would like to have a tooltip with the upper line's nearest point's data appear every time the mouse hovers an area between two lines.

I have absolut开发者_如何学JAVAely no idea on how to do this and my search queries were unsuccessful into finding a potential solution. I can only make a tooltip on the actual points of the plotted lines but not on the areas between them.

Do you have any idea on how to do it ?

Thank you in advance !

Example of chart : Example of chart


This Flot example seems to do what you want: http://people.iola.dk/olau/flot/examples/interacting.html.

It should be pretty straightforward, based on this code, to use jQuery to add a tooltip at the location of the cursor that displays the point's data. However, you might be better off displaying the coordinates of the cursor (time and value, or whatever) and only using a tooltip for the points provided by your data.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜