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

0 votes
129 views

Hi All,

I am new to SciChart world and need little assistance. I have to export scichart to image(format not matter right now). I am using WPF with MVVM. I have created a scichartsurface object in my viewmodel and now tryng to assign different properties that are bind to my actual scichartsurface in View. I am facing type casting error while assigning annotation preperty.

Here’s I define Annotation bind to actual graph in view

     public BindableCollection<TextAnnotationViewModel> GraphAnnotations;

here’s the code for where I am getting type mismatch error

    private void ChartToImage()
    {
        var chart = new SciChartSurface()
        {
            RenderableSeries = new RenderableSeriesSourceCollection(LineRenderSeries)
            Annotations = GraphAnnotations,
        };
    }

Here’s my View code

    <s:SciChartSurface
        Name="sciChart"
        Annotations="{s:AnnotationsBinding GraphAnnotations}"
        RenderableSeries="{s:SeriesBinding LineRenderSeries}">

It would be great if you also give example and details for X,Y Axis casting for my above ChartToImage method.

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