SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
I have an application for which the VerticalLineAnnotation is a near perfect fit. However, to make it easier to add these annotations from the AnnotationCreatioinModifier, I would like to derive a new annotation class from VerticalLineAnnotation with a couple of new dependency properties, and new label style using these properties. Is this possible? I’ve looked through the forum and existing examples, and can’t find relevant examples. Can you point me in the right direction?
If AnnotationCreationModifier is the problem, why not create a custom modifier?
It’s actually really easy to do this. You need some code to handle MouseDown, then place an annotation at the mouse point.
We have an example of something like this here: Add nearest Y value as annotation when click on chart.
There is also a set of documentation on custom modifiers API here: Custom Modifiers – ChartModifierBase API
Let me know if this helps,
My actual request only used AnnotationCreationModifier as an example. I was actually asking if you had any examples of using one of the existing annotation classes (particularly VerticalLineAnnotation) as the base class for a new Annotation type.
What I would like to do is extend VerticalLineAnnotation, addind a couple of new dependency properties, and new label style that show these properties.
I could do a Custom Annotation, but I would essentially need to create a user control which duplicated the VerticalLineAnnotation – seems like overkill to me.
By the way, I am also looking at avoiding AnnotationCreationModifier per the example code in this discussion:
Please login first to submit.