Hi Parthiban,
I've tried the new sample and it works despite some issues with Nuget packages not updating. In the sample all the binding was performed in Xaml but I need to set and change bindings in code behind. I've tried to move the xaml code into the cs file but seem to be impossible to add series in code behind, or rather are added but not plotted. I've added a zip file with all the files I've changed in the example.
This code;
Chart.Series.Add(new SplineSeries()
{
ItemsSource = "{Binding Data}",
YAxis = YAxis_Right,
XBindingPath = "Name",
YBindingPath = "Age",
Color = Color.Green,
Label = "Age"
});
does not plot the series, I had to define the series in xaml like this
<chart:SfChart.Series>
<chart:SplineSeries ItemsSource="{Binding Data}" Label="Heights" XBindingPath="Name" YBindingPath="Height" EnableTooltip="True">
<chart:ColumnSeries.DataMarker>
<chart:ChartDataMarker/>
</chart:ColumnSeries.DataMarker>
</chart:SplineSeries>
<chart:SplineSeries ItemsSource="{Binding Data}" Label="Ages" XBindingPath="Name" YBindingPath="Age" EnableTooltip="True">
<chart:ColumnSeries.DataMarker>
<chart:ChartDataMarker/>
</chart:ColumnSeries.DataMarker>
</chart:SplineSeries>
</chart:SfChart.Series>
and then change what I need in code bihind like this:
SplineSeries serie = (SplineSeries)Chart.Series[0];
//serie.YBindingPath = "Age";
serie.Color = Color.Aqua;
serie = (SplineSeries)Chart.Series[1];
serie.YAxis = YAxis_Right;
serie.Color = Color.Green;
Thanks for the support.
Bye
Fabrizio
Attachment:
ChartSample_7860bde4.zip