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


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 {

  • 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.