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

0
0

Hi! 🙂

I’m having some trouble with my annotations. This is the case:

I have a chart modifier with a dependency property that, when set or changed, manipulates its parent surface annotation collection directly. Currently I’m only adding/removing annotations of type VerticalLineAnnotation on a DateTimeAxis. My first problem is that only a single annotation is shown at any given time (the first one added). When i inspect the bindings and annotation collection on the sci chart surface everything seems to be in order (all annotations are present and their values are correct).

My second issue is that the first time my annotation is painted it is not properly displayed (only partly visible in the left upper corner). I have to force a repaint, through a re-size or zoom action, for my annotation to display correctly.

This is the type of annotations I’m adding to the AnnotationCollection:

var verticalAnnotation = new VerticalLineAnnotation
 {
        Tag = annotation.Tag,
         X1 = annotation.X1,
         StrokeThickness = annotation.StrokeThickness,
         Stroke = annotation.Stroke,
         LabelPlacement = LabelPlacement.Right
  };

Any idea about what I’m doing wrong?

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.