Pre loader

Android/IOS Annotations not visible

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

Hello, we are trying to add HotizontalLineAnnotations to our candlestick chart on tap. But we’ve got the following error :

mView does not exist, so discard the remaining points. java.lang.NullPointerException: Attempt to invoke interface method ‘java.lang.Comparable com.scichart.charting.visuals.axes.IAxis.getDataValue(float)’ on a null object reference

I’ve tried to set axisIds for annotations, but it seems that it doesn’t help. Could you please help me with this issue?

 val annotationCreationModifier = AnnotationCreationModifier()
    val annotationFactory = DefaultAnnotationFactory()

    annotationCreationModifier.annotationType = 6 // Horizontal Line
    annotationCreationModifier.annotationFactory = annotationFactory
    annotationCreationModifier.setAnnotationCreationListener {
        it.setIsEditable(true)
    }

    candleChartSurface.chartModifiers.add(sciChartBuilder
            .newModifierGroup()
            .withModifier(annotationCreationModifier)
            .build()
    )
Version
2.5.0.2598
  • Yura Khariton
    Based on code that you provided it’s hard to tell why this happens. It looks similar to the code that we have in our demo application, but it works there. So probably there is some other cause for this exception. Can you provide a full example which reproduces this issue?
  • You must to post comments
Showing 0 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