Pre loader

Looking for box annotation which has features in drag area to zoom

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

Closed
0
0

i wanna use vertical line annotation in box annotation that only one edge moves to drag like using ‘chart drag area to zoom’

I checked about custom annotation and there’s features said ‘common features of annotations’ but they don’t have any features l’m looking for

i put pictures for understanding.

there are box annotation on a graph and I want to move line to drag and box is going to smaller or larger

and i also want the other edge is fixed, it can not be dragged

do you guys have any tips for me?

Version
3.0.0.4253
Images
  • You must to post comments
1
0

Hi there,

Have you tried to combine box and 2 vertical line annotations, but make editable only vertical lines and drag only vertical lines? In this case you can set drag listener for vertical line and update position of box annotation based on position of vertical line ( set X1/X2 coords for box annotation to be equal to X1 coordinate of vertical line ). Also to provide effect of stretching box annotation vertically you can set relative coordinate mode in Y direction, then set Y1 = 0 and Y2 = 1 for annotation.

Is this suitable for your needs?

Best regards,
Yura

  • cy bang
    that is the one way to drag vertical line on box! thx for your help but i wonder that is the only one way to make a box dragging line? you might see ‘Drag Area to Zoom’, i know that is zoom modifier, but it looks almost same that i want. i mean looks like how it works when i drag vertical line, box(just looks like) is being large the one way
  • Yura Khariton
    Well I think that this is the easiest way to implement desired output, because it doesn’t require customization of chart and creating custom classes. Of course this can be done in differen way – for example you can create custom annotation ( e.g. extend vertical line annotation, override it’s onDraw() and draw filled area there, or extend box annotation and draw line there, or use custom background Drawable for box annotation with line in it ). Or you can do this using ChartModifiers API like we do in RubberBandXyZoomModifier, where we use simple custom View and change it layout params based on touch events. To do this you can create custom modifier (https://www.scichart.com/documentation/android/current/webframe.html#Custom%20Modifiers%20-%20ChartModifierBase%20API.html) and move annotation or custom View when some touch event occurs.
  • You must to post comments
Showing 1 result

Try SciChart Today

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

Start TrialCase Studies