Dear sirs,
i have a problem with TeeChart for .NET.
With an older version of the library (7.07 for Delphi) there was a function named "ColorRange" that allowed the user to change the color of a range of points for a graphic series.
Now, with my version of teechart for .NET, i cannot find the ColorRange function; there's some equivalent method?
In other words, How can I change the color for a range of points value in my graphic (...without rebuild the graph adding every point with his own color)?
Thanks in advance.
ColorRange Function
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: ColorRange Function
Hi e-ssentia,
This was in 3D series like: Surface, ColorGrid, Contour, etc.; for example:
http://www.teechart.net/support/viewtop ... nge#p13876
Wasn't it? Same properties and behaviour applies to TeeChart for .NET.
Hope this helps!
This was in 3D series like: Surface, ColorGrid, Contour, etc.; for example:
http://www.teechart.net/support/viewtop ... nge#p13876
Wasn't it? Same properties and behaviour applies to TeeChart for .NET.
Hope this helps!
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 |
Re: ColorRange Function
Thanks Narcís for the reply.
The problem is that I don't use a 3D series. In my chart I use a line serie, and in my old Delphi application I used the following function:
So I need to know how can obtain the same result with the version for .NET (if it's possible).
Thanks in advance.
The problem is that I don't use a 3D series. In my chart I use a line serie, and in my old Delphi application I used the following function:
Code: Select all
tChart1.Series[0].ColorRange(ValueList, FromValue, ToValue, Color);
Thanks in advance.
Re: ColorRange Function
Hi e-ssentia,
I've added this to the wish list to be implemented in future releases (TF02014632). In the meanwhile you could create your own function that would probably be very similar to the function that will be added to the sources as soon as possible:
I've added this to the wish list to be implemented in future releases (TF02014632). In the meanwhile you could create your own function that would probably be very similar to the function that will be added to the sources as soon as possible:
Code: Select all
private void ColorRange(Steema.TeeChart.Styles.Series ASeries, Steema.TeeChart.Styles.ValueList AValueList, double FromValue, double ToValue, Color AColor)
{
double tmpValue;
for (int t = 0; t < AValueList.Count; t++)
{
tmpValue = AValueList.Value[t];
if ((tmpValue >= FromValue) && (tmpValue <= ToValue) && (!ASeries.IsNull(t)))
ASeries.Colors[t] = AColor;
}
tChart1.Refresh();
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: ColorRange Function
Thanks Yeray, your function works!!!