Hi,
Is it possible to manually change the color between points AFTER adding a series?
I know you can do it when adding a series, however I want to set the color between each point in a line series after the series has been created, ie. loop through each series on the chart, and set the color between each point.
Is this possible?
Thanks in advance.
Changing color between points in a series
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Agrilink,
Yes, you have 2 options to achieve that:
1. Using one of Add method overloads which allow a color for each series point.
2. Directly looping through all series points and accessing its ValueColor property:
Yes, you have 2 options to achieve that:
1. Using one of Add method overloads which allow a color for each series point.
2. Directly looping through all series points and accessing its ValueColor property:
Code: Select all
for (int i = 0; i < tChart1.Series.Count; i++)
{
for (int j = 0; j < tChart1[j].Count; j++)
{
tChart1[i].ValueColor[j]=Color.FromArgb(i,j,0);
}
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Agrilink,
Yes, sorry, you should use:
Yes, sorry, you should use:
Code: Select all
tChart1[i].Colors[j] = Color.FromArgb(r, g, b);
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |