Pre loader

text annotation not showing



I am trying to add text annotation on the chart but it doesn’t show. I’m wondering what went wrong with my code.

TextAnnotation textAnnotation = sciChartBuilder.newTextAnnotation()
                .withFontStyle(20, Color.WHITE)
  • You must to post comments

Hi Gang Xu,

Is it possible that your X1 or Y1 coordinates are outside of VisibleRange for X or Y axis? If annotation is placed outside chart’s viewport bounds, then it won’t be visible. Also I would suggest to check logcat output if there are any errors there.

Best regards,

  • You must to post comments

Thanks Yura.

I just figured out the reason for annotation not showing up, which is because the AxisID. I defined XAxisID for the chart and the annotation works if I add withXAxisID(“ecgX”) in the code.

Except this, may I ask if there’s an efficient way to add hundreds of annotations at a time?

And is there a way to make an annotation selectable but not movable or resizable?

Also I noticed the annotations were off the position where they were supposed to be when I dragging the chart. Is that how it works?


  • You must to post comments
Showing 2 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