I'm creating 8 series in my chart - 4 lines, 4 points, one point series for each line. Data is displaying fine. I have used the Hay skin but have opted to change the color of one of my lines. However, I can't seem to get the pointmarks in the point series to change color.
I'm creating my series as follows:-
I know my code is stepping into the 2nd if (type==Point) and it appears to set the color, but when my chart is rendered, the points are all colored by the Hay skin. I've even tried setting the color after the series.add (commented out now in my SetChartData method.
Hopefully I'm doing something daft?
thanks
--Michael
I'm creating my series as follows:-
protected RadChart SetChartData(RadChart radChart, DataTable chartDataTable)
{
radChart.DataSource = chartDataTable;
radChart.Series.Add(CreateChartSeries("Assets", ChartSeriesType.Line, "Assets"));
radChart.Series[0].Appearance.LabelAppearance.Visible = false;
radChart.Series.Add(CreateChartSeries("Assets calibrations", ChartSeriesType.Point, Color.Red, "AssetCalibrations"));
//radChart.Series[1].Appearance.PointMark.FillStyle.MainColor = System.Drawing.Color.Red;
radChart.Series[1].Appearance.LabelAppearance.Visible = false;
and so forth for the other 6 series
return radChart;
}
which calls my CreateChartSeries method:-
protected ChartSeries CreateChartSeries(string name, ChartSeriesType type, Color seriesColor, string dataYColumn)
{
ChartSeries chartSeries = new ChartSeries();
chartSeries.Name = name;
chartSeries.Type = type;
if (type == Telerik.Charting.ChartSeriesType.Line) { chartSeries.Appearance.LineSeriesAppearance.Color = seriesColor; }
if (type == Telerik.Charting.ChartSeriesType.Point) { chartSeries.Appearance.PointMark.FillStyle.MainColor = seriesColor; }
chartSeries.DataYColumn = dataYColumn;
return chartSeries;
}
I know my code is stepping into the 2nd if (type==Point) and it appears to set the color, but when my chart is rendered, the points are all colored by the Hay skin. I've even tried setting the color after the series.add (commented out now in my SetChartData method.
Hopefully I'm doing something daft?
thanks
--Michael