Pre loader

Receiving CollectionChanged event from VerticalSliceModifier.SeriesData.SeriesInfo

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

Hi,

I’m trying to enable the use of multiple VerticalLineAnnotations and show the corresponding SeriesInfo in an extra legend to the user. Utilizing the RolloverModifier Tooltips example, this works quite easily for the position and values of the VerticalLineAnnotations. However, I would like to show differences (X and Y) between the values of two VerticalLineAnnotations in the same manner.

My approach was to subclass ChartDataObject and add an ObservableCollection of a custom class (SeriesDifferenceInfo) providing properties, which exhibit DeltaX and DeltaY for binding in the surface. For keeping this collection up to date when adding or removing a VerticalLineAnnotation, I registered for the CollectionChanged event of SeriesInfo in my subclassed ChartDataObject and wanted to update the Collection of SeriesDifferenceInfo subsequently. But somehow this event appears not to be triggered on a change in the list of SeriesInfo. Am I doing something wrong or is this intended behaviour? Of course, I could simply call a method UpdateDifferenceCollection(), when adding/removing a VerticalLineAnnotation, but is this really neccessary?

Also, the next problem is triggering PropertyChanged for the DeltaX and DeltaY values when the values of one SeriesInfo changed. I guess this could be done by listening to e.g. a drag event of VerticalLineAnnotation, but is there a more straightforward way to do this?

Best regards
Phil

Version
4.2.0.9172
  • Philipp Gregor
    Ok, I tried using the _propertyChanged event in the subclassed ChartDataObject as an update trigger (for adding/removing VerticalLineAnnotations and also just moving). This would actually do what I want/need, but SeriesInfo is updated all the time the mouse moves on the surface, so capturing this event gives an unreasonably high cpu load.
  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies