SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

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.