Hi!
Currently, I’m using Axis Layout – vertically stacked axes。When I use vertically stacked axes, click on a certain area, can I get on that axis? It’s from click on a certain area, not the series. I know the series can it.
can you give me some help?
- Jiawei Zhang asked 1 year ago
- You must login to post comments
Hi Jiawei,
I’ve created a codepen here to demonstrate how to detect if the mouse is over an axis when Vertically Stacked axis is enabled. This is based on our Custom ChartModifier documentation here.
How this works:
1/ We create the SciChartSurface with 3 YAxis and Vertically Stacked Axis (see here for docs)
2/ We create a class which inherits ChartModifierBase2D and override onModifierMouseMove
3/ We then detect where the user moves the mouse using the testIsInBounds function
4/ Finally we apply our custom modifier to the SciChartSurface
Please check it out and let me know if it answers the question. To change this from mouse-hover to mouse-click, put the detection code in onModifierMouseDown()
Best regards,
Andrew
- Andrew Burnett-Thompson answered 1 year ago
- You must login to post comments
Please login first to submit.