SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy

We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

0
0

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?

Bill

Version
4.1.1
  • You must to post comments
0
0

Hi Bill,

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,

Best regards,
Andrew

  • You must to post comments
0
0

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:
https://www.scichart.com/questions/question/add-vertical-line-annotation-programmatically

Bill

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.