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()
)
- Dok God asked 4 years ago
-
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 login to post comments
Please login first to submit.