When setting the Stroke of a series (in this case a ScatterLineSeries) to something other than the default, the RadLegend icon color does does not sync to match. I have tried nulling and resetting the LegendProvider of the legend in hopes it would grab the new colors, but I can't seem to find a work around for this issue. Is there anything I can do to keep the series and the icon colors in sync when they are set?
Xaml:
<Grid RowDefinitions="*">
<telerik:RadCartesianChart x:Name="chart"
Grid.Row="0">
<telerik:RadCartesianChart.HorizontalAxis>
<telerik:NumericalAxis x:Name="xAxis" />
</telerik:RadCartesianChart.HorizontalAxis>
<telerik:RadCartesianChart.VerticalAxis>
<telerik:NumericalAxis x:Name="yAxis" />
</telerik:RadCartesianChart.VerticalAxis>
<telerik:RadCartesianChart.Series />
<telerik:RadCartesianChart.Annotations>
<telerik:CartesianGridLineAnnotation x:Name="marker"
Axis="{x:Reference xAxis}" />
</telerik:RadCartesianChart.Annotations>
<telerik:RadCartesianChart.ChartBehaviors>
<telerik:ChartSelectionBehavior x:Name="selection"
DataPointSelectionMode="Single"
SelectionChanged="ChartSelectionBehavior_SelectionChanged" />
</telerik:RadCartesianChart.ChartBehaviors>
</telerik:RadCartesianChart>
<ScrollView Grid.Row="0"
VerticalOptions="Start"
x:Name="legendContainer"
HeightRequest="80">
<telerik:RadLegend x:Name="legend"
LegendProvider="{x:Reference Name=chart}" />
</ScrollView>
</Grid>
Code Behind:
ScatterLineSeries lineSeries = new ScatterLineSeries()
{
DisplayName = series.Name,
//Stroke = series.Color, cannot set this, as legend icon color will not match
StrokeThickness = series.Thickness,
XValueBinding = new PropertyNameDataPointBinding(nameof(SeriesData.XScaled)),
YValueBinding = new PropertyNameDataPointBinding(nameof(SeriesData.YScaled)),
ItemsSource = data
};