This is a migrated thread and some comments may be shown as answers.

Problems to set colors to report lines

2 Answers 113 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jp Maxwell
Top achievements
Rank 1
Jp Maxwell asked on 10 Dec 2007, 09:23 PM
I am creating a line report by adding dynamically the values for the series. Also, i am trying to set a different color for every line but I can't do that, since it is always setting default colors.
I tried by setting it for every element in the series via AddItem method (serie.AddItem(itemValue, null, colorToSet) but it didn't work. Also I tried to set it via the property Appearance.FillStyle.MainColor of every series item and didn't work too. Finally, I tried with SetColors method and did not work.
What should I do in order to set dynamically the color of every series line?

2 Answers, 1 is accepted

Sort by
0
Chavdar
Telerik team
answered on 11 Dec 2007, 09:58 AM
Hi Jp Maxwell,

The color of a line series is determined by the Appearance.LineSeriesAppearance.Color property of the Series class. For example:

    [ChartSeriesInstance].Appearance.LineSeriesAppearance.Color = System.Drawing.Color.Red;

Give it a try and let me know if the problem still persists.

Kind regards,
Chavdar
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Jp Maxwell
Top achievements
Rank 1
answered on 11 Dec 2007, 04:35 PM
Hi Chadvar

I want to inform to you that I did what you said and it worked well. Many thanks for your help.
Tags
General Discussions
Asked by
Jp Maxwell
Top achievements
Rank 1
Answers by
Chavdar
Telerik team
Jp Maxwell
Top achievements
Rank 1
Share this question
or