Pre loader

When I use vertically stacked axes, click on a certain area, can I get on that axis?

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1
0

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?

Version
3.0.284
  • You must to post comments
0
0

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.

enter image description 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

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.