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
- Tobias asked 2 years ago
- last edited 2 years ago
- 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!
- Hello Andrew, yes, it’s been a long time and a lot has happened in SciChart too :-) Thank you!
- You must login to post comments
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.
- Tobias answered 2 years ago
- last edited 2 years ago
- 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 login to post comments
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!
- Joeri R answered 2 years ago
- You must login to post comments
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?
- Tobias answered 2 years ago
- You must login to post comments
Please login first to submit.