Pre loader

Annotation Creation Modifier use IsSelected as creation status (edit mode) and should not

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

1
0

Hi SciChart team,

first of all I want to say that I still think SciChart is great! However, I am quite frustrated at the moment. In small applications, the chart and its annotations work very well (yes “Annotations are Easy!”), but in large industrial applications with many views and millions of lines of code, there are from time to time difficult complications with the chart. This is also the case now with the Annotation Creation Modifier. As far as I can see, the AnnotationCreationModifier.OnModifierMouseUp method uses the annotation’s IsSelected state to determine whether to create a new annotation or complete one. With custom composite annotation it can happen that a mouse click first selects the annotation and only then AnnotationCreationModifier.OnModifierMouseUp is called (see attached screenshots).
Sometimes it works, sometimes it doesn’t, depending on where the mouse is.
The AnnotationCreationModifier should not use the annotation’s IsSelected state to complete its internal “edit mode” and call “OnAnnotationCreated”.
Or is there already a solution for this?

regards,
Tobias

Version
7.0.2
Images
  • Andrew Burnett-Thompson
    Hi Tobias, nice to speak to you! I believe you have been using SciChart WPF for over 10 years now, congratulations! My first question would be – to clarify this for our developers can you share a small project that isolates the issue? Then with that explain expected vs. actual behaviour. From that I can share with our team and come back with some solutions for you. Thank you!
  • Tobias
    Hello Andrew, yes, it’s been a long time and a lot has happened in SciChart too :-) Thank you!
  • You must to post comments
1
0

I modified your “Create Annotations Dynamically” example from gitub:
https://github.com/ABTSoftware/SciChart.Wpf.Examples/tree/master/Examples/SciChart.Examples/Examples/AnnotateAChart/CreateAnnotationsDynamically

Please merge the files from the attached ZIP file.

Please think about it: The AnnotationCreationModifier uses the property IAnnotation.IsSelected as internal “state machine”. I don’t think that’s a good design! Or am I wrong about this?

  • Another issue is that the AnnotationCreationModifier excecute OnModifierMouseUp on double-click the chart (zoom). How to avoid AnnotationCreationModifier.OnModifierMouseUp on double-click without disabling (IsEnabled = false) the AnnotationCreationModifier?

  • Another issue is that it is not possible to set CanEditText without IsEditable. In this use case, the text of the text annotation should be editable, but the text annotation should not be moveable.

  • Joeri R
    Hi Tobias, thanks for the example. Our team will check it and get back to you when they have a solution. Also, we will investigate possible solutions for the issues raised by your questions. Please bear with us,
  • You must to post comments
0
0

Hi Tobias,

We’ve investigated the issues with AnnotationCreationModifier you reported.

It seems that you are right and there is no point in using Selected state during annotation creation. We are going to review current behavior and try to change it in the next SciChart version (if that will be possible).

As to the issue with TextAnnotations that cannot be text-edited without being non-movable, it can be solved by changing the default behavior with method override.

Please take a look at the attached example. This is your example modified to better suit your requirements. Essentially all the changes are inside new classes AnnotationCreationModifierEx and TextAnnotationEx.

And regarding the issue with double-click, thank you for pointing it to us. I logged it in our issue tracker and we will investigate it further. For now, I can suggest that you re-implement AnnotationCreationModifier to work only when Mouse is dragged with LMB pressed. Or, you can check time and distance between two clicks and remove an annotation if these two are close.

Besides, we can be more helpful if you provide full requirements for EditableCompositeAnnotation and the desired behavior in your application.

Hope this helps!

  • You must to post comments
0
0

I am considering applying server-side licensing for my javerScript application.

In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support.scichart.com/index.php?/Knowledgebase/Article/View/17256/42/)

However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)

I wonder if there is a sample code implemented in C++ for server-side licensing.

Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?

  • You must to post comments
Showing 3 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