For some reason im unable to select multiple series in my scatter chart. what am i doing wrong?
@using Syncfusion.Blazor
@using Syncfusion.Blazor.Charts
@inject NavigationManager NavigationManager
<SfChart Title="TestGraph" AllowMultiSelection="true" SelectionMode="SelectionMode.DragXY">
<ChartSeriesCollection>
<ChartSeries DataSource="@SalesReports" XName="X" YName="Y" Type="ChartSeriesType.Scatter">
</ChartSeries>
<ChartSeries DataSource="@SalesReports1" XName="X" YName="Y" Type="ChartSeriesType.Scatter">
</ChartSeries>
</ChartSeriesCollection>
</SfChart>
@code{
public class ChartData
{
public double X { get; set; }
public double Y { get; set; }
}
public List<ChartData> SalesReports = new List<ChartData>
{
new ChartData { X= 60, Y= -8},
new ChartData { X= 48, Y= 2},
new ChartData { X= 66, Y= 3},
new ChartData { X= 78, Y= 2}
};
public List<ChartData> SalesReports1 = new List<ChartData>
{
new ChartData { X= 90, Y= 3},
new ChartData { X= -7, Y= 60.5},
new ChartData { X= 42, Y= 17},
new ChartData { X= 4, Y= 65},
};
}
|
@using Syncfusion.Blazor
@using Syncfusion.Blazor.Charts
@inject NavigationManager NavigationManager
<SfChart Title="TestGraph" AllowMultiSelection="true" SelectionMode="SelectionMode.DragXY">
<ChartSeriesCollection>
<ChartSeries DataSource="@SalesReports" XName="X" YName="Y" Type="ChartSeriesType.Scatter">
</ChartSeries>
<ChartSeries DataSource="@SalesReports1" XName="X" YName="Y" Type="ChartSeriesType.Scatter">
</ChartSeries>
</ChartSeriesCollection>
</SfChart>
@code{
public class ChartData
{
public double X { get; set; }
public double Y { get; set; }
}
public List<ChartData> SalesReports = new List<ChartData>
{
new ChartData { X= 60, Y= -8},
new ChartData { X= 48, Y= 2},
new ChartData { X= 66, Y= 3},
new ChartData { X= 78, Y= 2}
};
public List<ChartData> SalesReports1 = new List<ChartData>
{
new ChartData { X= 50, Y= 8},
new ChartData { X= 60, Y= 4},
new ChartData { X= 70, Y= 2},
new ChartData { X= 65, Y= 5}
};
} |
Hello again!
When I create a method for the chart event i only get values from one chartseries. i have attached a zipfile where i have this issue
Kind regards
Rickard Hoffman