Pre loader

it's kind of weird

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 used box annotation like pic
in a boxAnnotation I used

.withIsEditable(true)
.withPosition(1,-2, 0, 2)
.withBackgroundDrawableId(R.drawable.example_box_annotation_background_4)
.withResizingGrip(customIResizingGrip)
.withAnnotationDragListener(customIAnnotationSelectionDrawable)
.withResizeDirections(Direction2D.XDirection)
.withDragDirections(Direction2D.XDirection)
.build();

and i made a 2 box like pic

i use box for drag one side to make a box big or small

the first box which is left doesn’t move anywhere.
it just can only drag that i want
but the second box, the box moves when i drag after first touch
the left box never moves on but right box moves first drags
just move first time not sometimes

am i wrong something?

Version
3.1.0.4412
Images
  • Yura Khariton
    Can you provide an entire code which reproduces this problem(maybe you can modify one of our examples from demo application)? Your code looks valid so I’m not sure what is the cause of this issue.
  • Justin Lee
    I put a code on Answers section
  • You must to post comments
0
0

private void initBox() {
Paint paint = new Paint();
paint.setColor(Color.RED);

    Canvas canvas = new Canvas();
    canvas.drawRect(100, 100, 100, 100, paint);

    CustomIResizingGrip customIResizingGrip = new CustomIResizingGrip();
    CustomLeftBoxAnnotationDragListener customLeftBoxAnnotationDragListener = new CustomLeftBoxAnnotationDragListener();
    CustomRightBoxAnnotationDragListener customRightBoxAnnotationDragListener = new CustomRightBoxAnnotationDragListener();

    customIResizingGrip.onDraw(canvas, 10, 20);

    final BoxAnnotation boxAnnotation = sciChartBuilder.newBoxAnnotation()
            .withIsEditable(true)
            .withPosition(1,-20000, 0, 20000)
            .withBackgroundDrawableId(R.drawable.example_box_annotation_background_4)
            .withResizingGrip(customIResizingGrip)
            .withAnnotationDragListener(customLeftBoxAnnotationDragListener)
            .withDragDirections(Direction2D.XDirection)
            .withResizeDirections(Direction2D.XDirection)
            .build();
    final BoxAnnotation boxAnnotation2 = sciChartBuilder.newBoxAnnotation()
            .withIsEditable(true)
            .withPosition(wavFileTime-1,-20000, wavFileTime+1,20000)
            .withBackgroundDrawableId(R.drawable.example_box_annotation_background_4)
            .withResizingGrip(customIResizingGrip)
            .withAnnotationDragListener(customRightBoxAnnotationDragListener)
            .withDragDirections(Direction2D.XDirection)
            .withResizeDirections(Direction2D.XDirection)
            .build();

    UpdateSuspender.using(audioStreamChart, () -> {
        Collections.addAll(audioStreamChart.getAnnotations(), boxAnnotation, boxAnnotation2);
    });
}

it’s source code

is it something wrong?

  • Yura Khariton
    It’s hard to tell why this happens. Code that you provided looks valid. Can you provide entire project so I can debut it on my PC? Or maybe you can modify one of examples from our demo application and reproduce this issue there?
  • Justin Lee
    how can i modify this source code?
  • Justin Lee
    i updated my source code at issue page on your official github
  • You must to post comments
Showing 1 result
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