Hi,
I have two line series.I set the first serie color to BLUE, then I set the second serie color to RED.
I don't know why the second serie always appear BLUE. I think this might be simple but I can't visualize the solution.
Can anyone help? The code Follows below:
Thanks,
Marcio Nascimento
I have two line series.I set the first serie color to BLUE, then I set the second serie color to RED.
I don't know why the second serie always appear BLUE. I think this might be simple but I can't visualize the solution.
Can anyone help? The code Follows below:
private void PopulateChart3(string seriesID){ RadChart1.Clear(); SapeDBDataContext db = new SapeDBDataContext(); int ID = Convert.ToInt32(seriesID); var windh = from p in db.SAPE_WindSeries where p.id_localidade == ID where p.valorh != null select p; var windp = from p in db.SAPE_WindSeries where p.id_localidade == ID where p.valorp != null select p; ChartSeries s = new ChartSeries(); s.Type = Telerik.Charting.ChartSeriesType.Line; s.Appearance.LabelAppearance.Visible = false; s.Name = "Historic"; s.Appearance.LineSeriesAppearance.Color = System.Drawing.Color.Blue; foreach (var wi in windh) { ChartSeriesItem item = new ChartSeriesItem(); item.XValue = Convert.ToInt32(wi.dia); item.YValue = Convert.ToDouble(wi.valorh); s.Items.Add(item); } ChartSeries s2 = new ChartSeries(); s2.Type = Telerik.Charting.ChartSeriesType.Line; s2.Appearance.LabelAppearance.Visible = false; s2.Appearance.LineSeriesAppearance.Color = System.Drawing.Color.Red; s2.Name = "Projected"; foreach (var wi in windp) { ChartSeriesItem item2 = new ChartSeriesItem(); item2.XValue = Convert.ToInt32(wi.dia); item2.YValue = Convert.ToDouble(wi.valorp); s.Items.Add(item2); } RadChart1.Series.Add(s); RadChart1.Series.Add(s2);}Thanks,
Marcio Nascimento