SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components
Hi,
How can i listen annotation selection changes? I try this code but i’m getting error “Cannot assign to property: ‘lineAnnotation’ is immutable”
var lineAnnotation = SCILineAnnotation()
lineAnnotation.annotationSelectionChangedListener = { (annotation, isSelected) in
//
}
Tnx.
Hi there,
You missed return type in your closure, please see the API docs
Thats actually a mistake in API and that will be fixed in one of the next nightly builds
For now, please use the code like below:
lineAnnotation.annotationSelectionChangedListener = { (annotation, isSelected) -> Bool in
print("isSelected: \(isSelected)")
return true
}
Hope that helps.
Best Regards,
Nazar R.
Please login first to submit.