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

0 votes
2k views

I’m adding an annotation to a chart with a DateTime x-axis. Without a label the annotation is successfully added. However, if I specify a label I get an InvalidOperationException when Add() is called. The exception message is “The Type this is a test is not a valid Comparable Type”}:

                var annotation = new VerticalLineAnnotation
                {
                    VerticalAlignment = VerticalAlignment.Stretch,
                    ShowLabel = true,
                    X1 = time.DateTime,
                    Stroke = System.Windows.Media.Brushes.Orange,
                    LabelPlacement = LabelPlacement.TopRight,
                    LabelValue = "this is a test",
                    LabelsOrientation = Orientation.Vertical
                };

                MyChart.Annotations.Add(annotation);

The LabelValue is obviously of type string and non-null and indeed of type IComparable. Any reason I can’t add it?

  • Dan Pilat asked 3 years ago
  • last active 2 years ago
1 vote
286 views

I’m able to turn the SciChartOverview control so that it appears vertical and am able to get the grips to flow vertically as well but whenever the data is flowing, it still flows horizontally. How do I get it to flow vertically? See attached image for what it currently does.

Showing 2 results
This template supports the sidebar's widgets. Add one or use Full Width layout.