Problem Binding LineSeries X,Y Values

Hi,
i have the Problems with binding of X and Y Values with LineSeries.
How can i debug it?

XAML:       
     <syncfusion:SfChart AreaBorderThickness="0,0.5,0.5,0" Margin="0,0,0,5" >
                    <syncfusion:SfChart.DataContext >
                        <local:OverviewTestSerieViewModel/>
                    </syncfusion:SfChart.DataContext>
                    <syncfusion:SfChart.PrimaryAxis>
                        <syncfusion:NumericalAxis  Header="Power Production Year" FontSize="12"  />
                    </syncfusion:SfChart.PrimaryAxis>
                    <syncfusion:SfChart.SecondaryAxis>
                        <syncfusion:NumericalAxis Header="Efficiency(%)"  />
                    </syncfusion:SfChart.SecondaryAxis>
                    <syncfusion:SfChart.Legend>
                        <syncfusion:ChartLegend Visibility="Visible"/>
                    </syncfusion:SfChart.Legend>
                    <syncfusion:LineSeries  ItemsSource="{Binding Selected.TestData}" XBindingPath="X" YBindingPath="Y"/>
                </syncfusion:SfChart>

OverviewTestSerieViewModel:
  private TestSerie _selected;
        public TestSerie Selected
        {
            get => _selected;
            set => Set(ref _selected, value);
        }

TestSeries:
public class TestSeries
{
public class Coord
        {
            public int X { get; set; }
            public int Y { get; set; }
        }
public List<Coord> TestData { get; set; }
}

Initialization:
Selected=new TestSeries
{
TestData = new List<Messung.Coord>()
                    {
                        new Messung.Coord()
                            {X = 0,Y = 0},
                        new Messung.Coord()
                            {X = 1,Y = 1},
                        new Messung.Coord()
                            {X = 2,Y = 2},
                        new Messung.Coord()
                            {X = 3,Y = 3},
                    }
}
Best regards
Brian

1 Reply

MK Muneesh Kumar G Syncfusion Team March 13, 2018 11:27 AM UTC

Hi Brian Dahl,

Thanks for using Syncfusion products.
 
 
We have prepared a sample based on your code and checked with binding. It is working properly. Can you please check with the sample in the following location? If still you face the problem, please revert us by modifying the sample based on your application along with replication procedure. This would be helpful for us to serve you. 
Please let us know if you have any queries.

Regards,
Muneesh Kumar G.
 



Loader.
Up arrow icon