I have a chart with 8 point series in that and i have defined custom palette as below
<.......XML....>
<telerik:ChartPalette x:Key="customPalette">
<telerik:ChartPalette.SeriesEntries>
<telerik:PaletteEntryCollection SeriesFamily="Point">
<telerik:PaletteEntry Fill="SandyBrown" Stroke="{x:Null}"/>
<telerik:PaletteEntry Fill="Lime" Stroke="{x:Null}"/>
<telerik:PaletteEntry Fill="SlateGray" Stroke="{x:Null}"/>
<telerik:PaletteEntry Fill="SteelBlue" Stroke="{x:Null}"/>
<telerik:PaletteEntry Fill="YellowGreen" Stroke="{x:Null}"/>
<telerik:PaletteEntry Fill="Aquamarine" Stroke="{x:Null}"/>
<telerik:PaletteEntry Fill="Violet" Stroke="{x:Null}"/>
<!--<telerik:PaletteEntry Fill="Olive" Stroke="{x:Null}"/>-->
</telerik:PaletteEntryCollection>
</telerik:ChartPalette.SeriesEntries>
</telerik:ChartPalette>
<.......cs code.....>
chart.Palette = App.Current.Resources["customPalette"] as ChartPalette;
foreach (string location in locationInfo.ParameterLocationNames)
{
ObservableCollection<ParameterResult> parameterResults = new ObservableCollection<ParameterResult>();
dictionaryParameterResults.Add(location, parameterResults);
PointSeries valueSeries = new PointSeries();
valueSeries.ItemsSource = parameterResults;
valueSeries.PointSize = new Size() { Height = 6, Width = 6 };
valueSeries.CategoryBinding = new PropertyNameDataPointBinding("Time");
valueSeries.ValueBinding = new PropertyNameDataPointBinding("Val");
valueSeries.Visibility = System.Windows.Visibility.Visible;
valueSeries.LegendSettings = new SeriesLegendSettings();
valueSeries.LegendSettings.Title = location.Replace(locationInfo.Name + ".", "");
chart.Series.Add(valueSeries);
}
as you see now for 8 series i have only 7 palette colors defined and in this case 1st and 8th series have same color.
if i define one more color and make 8 colors in palette then chart is using only first 4 colors and repeating the same colors for next 4 series
I wanted have all series in different colors
<.......XML....>
<telerik:ChartPalette x:Key="customPalette">
<telerik:ChartPalette.SeriesEntries>
<telerik:PaletteEntryCollection SeriesFamily="Point">
<telerik:PaletteEntry Fill="SandyBrown" Stroke="{x:Null}"/>
<telerik:PaletteEntry Fill="Lime" Stroke="{x:Null}"/>
<telerik:PaletteEntry Fill="SlateGray" Stroke="{x:Null}"/>
<telerik:PaletteEntry Fill="SteelBlue" Stroke="{x:Null}"/>
<telerik:PaletteEntry Fill="YellowGreen" Stroke="{x:Null}"/>
<telerik:PaletteEntry Fill="Aquamarine" Stroke="{x:Null}"/>
<telerik:PaletteEntry Fill="Violet" Stroke="{x:Null}"/>
<!--<telerik:PaletteEntry Fill="Olive" Stroke="{x:Null}"/>-->
</telerik:PaletteEntryCollection>
</telerik:ChartPalette.SeriesEntries>
</telerik:ChartPalette>
<.......cs code.....>
chart.Palette = App.Current.Resources["customPalette"] as ChartPalette;
foreach (string location in locationInfo.ParameterLocationNames)
{
ObservableCollection<ParameterResult> parameterResults = new ObservableCollection<ParameterResult>();
dictionaryParameterResults.Add(location, parameterResults);
PointSeries valueSeries = new PointSeries();
valueSeries.ItemsSource = parameterResults;
valueSeries.PointSize = new Size() { Height = 6, Width = 6 };
valueSeries.CategoryBinding = new PropertyNameDataPointBinding("Time");
valueSeries.ValueBinding = new PropertyNameDataPointBinding("Val");
valueSeries.Visibility = System.Windows.Visibility.Visible;
valueSeries.LegendSettings = new SeriesLegendSettings();
valueSeries.LegendSettings.Title = location.Replace(locationInfo.Name + ".", "");
chart.Series.Add(valueSeries);
}
as you see now for 8 series i have only 7 palette colors defined and in this case 1st and 8th series have same color.
if i define one more color and make 8 colors in palette then chart is using only first 4 colors and repeating the same colors for next 4 series
I wanted have all series in different colors