Is it possible to change the point style (i.e., the shape) for part of a line series? For example, if I have a line series with square points, is it possible to use a triangle marker for some of the points in the series?
I'm using TeeChart .Net version 2.
Thanks!
Chris
Changing the point shape for part of a series
-
- Newbie
- Posts: 4
- Joined: Mon May 24, 2004 4:00 am
- Location: USA
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Chris,
Yes, you can use OnGetSeriesPointerStyle event for that. You'll find an example in Tutorial 6 - Working with Series. Tutorials can be found at TeeChart's program group.
Yes, you can use OnGetSeriesPointerStyle event for that. You'll find an example in Tutorial 6 - Working with Series. Tutorials can be found at TeeChart's program group.
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 |
-
- Newbie
- Posts: 4
- Joined: Mon May 24, 2004 4:00 am
- Location: USA
Thank you for the reply. I found the example in the tutorial and successfully used the same logic in my code.
I have another question: is it possible to change the point color for part of a series? In my application, I would like to set the point color to transparent if the value meets certain conditions. The OnGetSeriesPointerStyle event allows me to control the pointer shape, but I haven't figured out how to change the point color.
Thanks again.
Chris
I have another question: is it possible to change the point color for part of a series? In my application, I would like to set the point color to transparent if the value meets certain conditions. The OnGetSeriesPointerStyle event allows me to control the pointer shape, but I haven't figured out how to change the point color.
Thanks again.
Chris
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Chris,
Yes, it can be done in the same way as Pointer.Sytle. You can use the e.Color event argument for that. If you don't want to display pointers you can also set them to Steema.TeeChart.Styles.PointerStyles.Nothing style.
Yes, it can be done in the same way as Pointer.Sytle. You can use the e.Color event argument for that. If you don't want to display pointers you can also set them to Steema.TeeChart.Styles.PointerStyles.Nothing style.
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 |
-
- Newbie
- Posts: 4
- Joined: Mon May 24, 2004 4:00 am
- Location: USA
Sorry, but I need more help.
e.Color is not accessible from the OnGetSeriesPointerStyle event.
I tried the following:
// function argument types omitted to save space
private void line1_GetPointerStyle(series, e)
{
if (e.ValueIndex == 0)
series.Pointer.Color = System.Drawing.Color.Transparent;
else
series.Pointer.Color = series.Color;
}
This changes the color of the second point, not the first. It seems that when the color is changed using this approach, the setting applies to the next point, not the current point. Moreover, if I specify the last valid data index (e.g., 3 for a series with 4 points), none of the points are initially affected, but if the graph is zoomed in and then out, the first point gets the new color!
What's the correct approach for setting the point color?
e.Color is not accessible from the OnGetSeriesPointerStyle event.
I tried the following:
// function argument types omitted to save space
private void line1_GetPointerStyle(series, e)
{
if (e.ValueIndex == 0)
series.Pointer.Color = System.Drawing.Color.Transparent;
else
series.Pointer.Color = series.Color;
}
This changes the color of the second point, not the first. It seems that when the color is changed using this approach, the setting applies to the next point, not the current point. Moreover, if I specify the last valid data index (e.g., 3 for a series with 4 points), none of the points are initially affected, but if the graph is zoomed in and then out, the first point gets the new color!
What's the correct approach for setting the point color?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Chris,
Sorry, I missed that you said you were using v2. Changing pointer color using OnGetPointerStyle event arguments is only supported in v3.
In v2 you'll have to do something as discussed on this thread. Please notice that it's quite a long thread (has a few pages) and several solutions were discussed there.
Sorry, I missed that you said you were using v2. Changing pointer color using OnGetPointerStyle event arguments is only supported in v3.
In v2 you'll have to do something as discussed on this thread. Please notice that it's quite a long thread (has a few pages) and several solutions were discussed there.
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 |