Pre loader

customAnnotation isSelected changed event

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 am trying to get an event when a customAnnotation is selected and unselected. I can of course is click to coincide with selection, but how do I listen on the unselected event?

Thanks,

Pramod

Version
3.1.333
  • You must to post comments
0
0

Hello, the Annotation API allows to subscribe to changes of the “isSelected” property via the “selectedChanged” event handler.

    customAnnotation.selectedChanged.subscribe(isSelected => { if(!isSelected) console.log("unselected") });

You can check other available properties and interfaces in Typedoc

  • You must to post comments
0
0

Dear Jim,

thank you! I have multiple annotations, how do I know which annotation was selected/unselected?

Best,

Pramod

  • You must to post comments
0
0

Dear Jim,

thank you! I have multiple annotations, how do I know which annotation was selected/unselected?

Best,

Pramod

  • Jim Risen
    Currently, it seems like you’ll have to pass different callbacks to each with an appropriate annotation references. Alternatively, you can override some methods of the annotation, for example “isSelected” setter. FYI, we are considering some refactoring and implementation of a new API for the Annotation Selection and related APIs.
  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.