Pre loader

Android Scroll on Axis Label

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

0
0

I would like to add scroll listener on x axis title. Is it possible to add scroll to axis title

Version
4.2.0.4557
  • You must to post comments
0
0

Hi there,

Unfortunately we don’t provide listener for scrolling on axis title out of the box. The closest behavior which we provide out of the box are XAxisDragModifier/YAxisDragModifier. They modify VisibleRange of axis when you perform scroll gesture inside axis rect. These modifiers are implemented as custom ChartModifiers which listens to touch events from entire chart, but change VisibleRange only if touch event is within axis bounds. So theoretically you can use similar approach to perform some custom action instead of changing VIsibleRange.

May I ask what are you trying to achieve? Why do you need scrolling on axis title?

Best regards,
Yura

  • Vinu Gilbert
    Thankyou for your response. I’ve already added the drag listeners. Here What i am trying to acheive is to increase the area of touch , so that it will be easy to the drag listener .Ill attach a screen shot.
  • You must to post comments
0
0

scroll on x-axis title also

Images
  • You must to post comments
0
0

Hi there,

If you’re using X/YAxisDragModifier and want to increase touch area, you can set MinTouchArea property on this modifier. In this case modifier should extend touch area in horizontal/vertical direction by specified amount of pixels.

Is this suitable for your needs?

Best regards,
Yura

  • You must to post comments
0
0

Hi ,i’ve tried adding some values to XAxisDragModifier,but it didn’t make any change on touch area.I think set some wrong values.i’ll share code snippet

val xAxisDragModifier = XAxisDragModifier()
xAxisDragModifier.dragMode = AxisDragModifierBase.AxisDragMode.Pan
xAxisDragModifier.clipModeX = ClipMode.None
xAxisDragModifier.minTouchArea= 100f

its not increasing or decreasing the touch area. What am i doing wrong here?

  • Yura Khariton
    Can you try setting bigger minTouchArea ( I just tried to set 500f and it worked for me )? As I see you set 100f which will be equal to 100 device pixels. Can you try to set minTouchArea in device independent pixels ( e.g. you can use DisplayMetrics to do conversion )? If you have screen with high DPI value this could result small touch area on screen. Also do you use some other modifiers? If yes, then it’s possible that some other modifier handles touch events before they reach XAxisDragModifier. In this case try to set xAxisDragModifier.receiveHandledEvents = true
  • You must to post comments
0
0

thankyou it worked

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies