Hello,
I am currently evaluating the chart library, and plotting a FastLineRenderableSeries with an Ellipse PointMarker.
This displays exactly the graph I want. However, I would like that when the user hovers over a point, the point would highlight and he can see a tooltip showing what is the exact X value and the exact Y value.
Example of what I would like : http://www.highcharts.com/demo/line-basic
Would be even better if when hovering over the line the “nearest” actual point were highlighted with the tooltip.
I have tried a quick search and haven’t come up with the solution yet, note I am new to the library.
Thanks
- You must login to post comments
Hi Jean-Jacques,
Thank you for your enquiry! SciChart has a rich ChartModifier API which allows you to tag modifiers (behaviours) on to a chart to give it different actions on mouse move, mouse down etc…
The first ChartModifier you need to add is the TooltipModifier. This will give you mouse-over tooltips on a point-marker.
To achieve highlighting of the line on mouse over, we don’t support this out of the box but we do support something quite similar. The SeriesSelectionModifier allows applying a custom style to a line on mouse-up (selection) of a series. I’m sure it could be re-worked to try-select on mouse move not mouse up.
public class SeriesSelectionModifierEx : SeriesSelectionModifier
{
public override void OnModifierMouseUp(ModifierMouseArgs e)
{
}
public override void OnModifierMouseMove(ModifierMouseArgs e)
{
base.OnModifierMouseUp(e);
}
}
Let me know if this helps
- Andrew Burnett-Thompson answered 8 years ago
- You must login to post comments
Thanks, I have done the first part (tooltip modifier) , will do the second one but works perfectly.
- Jean-Jacques Bouzaglou answered 8 years ago
-
Great, let me know if you need anything else. Please be advised, continuous selection on mouse-move will add some CPU load to your application. There are other solutions like it may be possible to modify TooltipModifier (which does the hit-test already) to perform both actions: Highlighting AND tooltip
-
How should I modify the tooltip modifier?I can try to implement and monitor the CPU usage anyway. I haven’t asked the question but to give context I will want to do something when a point is clicked according to it’s X/Y coordinates (the idea will be to provide context on that point, maybe with another chart).
- You must login to post comments
Please login first to submit.