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

0
0

Hi,

CompositeAnnotation works perfectly and easy to use, but I need it in MVVM. CompositeAnnotationViewModel looks the same, but it is not visible. This is my code:

AnnotationViewModels.Add(new CompositeAnnotationViewModel()
{
    Annotations = new ObservableCollection<IAnnotationViewModel>()
    {
        new VerticalLineAnnotationViewModel
        {
            VerticalAlignment = VerticalAlignment.Stretch,
            Stroke = Colors.Blue,
            StrokeThickness = 2,
            IsEditable = true,
            StrokeDashArray = new DoubleCollection() { 2, 2 },
            CoordinateMode = AnnotationCoordinateMode.Relative,
            X1 = 0
        },
        new VerticalLineAnnotationViewModel
        {
            VerticalAlignment = VerticalAlignment.Stretch,
            Stroke = Colors.Blue,
            StrokeThickness = 2,
            IsEditable = true,
            StrokeDashArray = new DoubleCollection() { 2, 2 },
            CoordinateMode = AnnotationCoordinateMode.Relative,
            X1 = 1
        }
    },
    IsEditable = true,
    X1 = 3,
    X2 = 5
});

What is my mistake?

Version
5
  • You must to post comments
0
0

Hi there,

Thank you for reporting this, I’m going to investigate this, will post you an update a bit later.

Best regards, Taras B.

  • You must to post comments
0
0

Hi there,

I’m pleased to inform you that the issue has been fixed in the latest build #v5.1.1.11493. You can get it through our NuGet feed:
https://www.myget.org/gallery/abtsoftware

It needs 15 min to build on a build server.

Please try it out and let us know if the fix works for you too.
Hope this helps,

Best regards, Taras B.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.