We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

SfChart with array in YBindingPath

Thread ID:

Created:

Updated:

Platform:

Replies:

117960 Jan 13,2015 03:24 PM Jan 14,2015 05:06 AM WPF 1
loading
Tags: SfChart
Nico Suchold
Asked On January 13, 2015 03:24 PM

The data series are not showing with follow setup:

XAML

<syncfusion:SfChart HorizontalAlignment="Right" x:Name="chart" />

C#-model

    public class Data
    {
        public Data(DateTime date, params double[] value)
        {
            Date = date;
            Value = value;
        }

        public DateTime Date
        {
            get;
            set;
        }

        public double[] Value
        {
            get;
            set;
        }
    }

C# controler

           DataGenerator _viewModel = new DataGenerator();
           ObservableCollection<Data> data = _viewModel.GenerateData(); / /data are correct generated here based on the model
           FastLineSeries dataSeries = new FastLineSeries();
           chart.Series.Add(dataSeries);

            dataSeries.ItemsSource = data;
            dataSeries.XBindingPath = "Date";
            dataSeries.YBindingPath = "Value[0]";

The "Value[0]" expression is the problem. When it changed to "Value" and Value return a double, then the chart will be drawn.


Rachel A [Syncfusion]
Replied On January 14, 2015 05:06 AM

Hi Nico,

We are sorry to let you know that, we don’t have support for using an Array type property (Value [0]) to chart Y-Axis. We are able to use only Double or Int type properties.

Please let us know if you need any further assistance.

Thanks,

Rachel. A



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;