开发者

how to get the Y value on the curve using flot js

开发者 https://www.devze.com 2023-02-12 01:33 出处:网络
Using the flot js graphing library, you can get the (x,y) position of th开发者_JAVA百科e mouse. Given a curve represented by plot values, how can you get the interpolated Y value on the curve for the

Using the flot js graphing library, you can get the (x,y) position of th开发者_JAVA百科e mouse. Given a curve represented by plot values, how can you get the interpolated Y value on the curve for the given mouse position?


There's a crosshair/tracking demo on their pages. It has an updateLegend method which simply takes the nearest x values at the crosshair line and does some linear interpolation.

0

精彩评论

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