- Hi Andrew! I call the Clear like you detailed in #1 above, but when a new instance of the chart is created (databound to the persistent ObservableCollection of Annotations), those Annotations and the AnnotationCollection do not have their Parent/ParentSurface set to the new chart instance. What is the best way to re-attach them to the new SciChartSurface? Thanks!
- Hi Matthew, it should work (I checked the code). If not, possibly a bug. I would recommend creating new annotations then (2, or 2a) and we will log a bug for investigation at some point.
- I now have also tried re-creating the entire AnnotationCollection along with all the Annotations within it, based on the data in the old annotations, when the chart is re-created, but the new AnnotationCollection.ParentSurface never gets set to the new chart instance either.
- Maybe its time to zip up your source code (or subset of to reproduce the problem) and email it to us? .. :)
- I ended up just keeping the raw data for the annotations persistent and moving the actual AnnotationCollection to the viewmodel, so it is recreated each time the user returns to graph. It does make me wonder though, why annotations would give me this issue, but the DataSeries seem to work properly in a recreated chart as-is.
- I’m glad you got it sorted out Matthew! If you need further help, feel free to open a new forum post, or contact the support desk. Best regards, Andrew