Client side mouseovers for data
Posted: Wed Jan 28, 2009 6:21 pm
Here’s what I need to do.
Build a line graph.
Save it as an image.
Stream the image to the client. ( I need to do this because we are using Sharpoint)
Use javascript mouseovers to show information on the data points.
The javascript mouseovers are easy if I know the pixel coordinates of the data points. How do I get these coordinates?
1) How do I get, in pixels, the start position of the bottom axis relative to the left edge of the chart? There doesn’t seem to be any way go get this.
2) How do I get the closest data point to a given set of xy coordinates WITHOUT A POSTBACK?
3) I already tried using calcXPosValue but no matter the value I ask for, it either returns zero (before saving the chart as a bitmap) or 290 (after saving the chart as a bitmap).
I cannot be the first guy to try doing things with the chart on the client side, can I?
Build a line graph.
Save it as an image.
Stream the image to the client. ( I need to do this because we are using Sharpoint)
Use javascript mouseovers to show information on the data points.
The javascript mouseovers are easy if I know the pixel coordinates of the data points. How do I get these coordinates?
1) How do I get, in pixels, the start position of the bottom axis relative to the left edge of the chart? There doesn’t seem to be any way go get this.
2) How do I get the closest data point to a given set of xy coordinates WITHOUT A POSTBACK?
3) I already tried using calcXPosValue but no matter the value I ask for, it either returns zero (before saving the chart as a bitmap) or 290 (after saving the chart as a bitmap).
I cannot be the first guy to try doing things with the chart on the client side, can I?