How do I individually set properties for points in a series?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Rookie_SP
Newbie
Newbie
Posts: 7
Joined: Fri Nov 15, 2002 12:00 am
Location: Spain

How do I individually set properties for points in a series?

Post by Rookie_SP » Sat Jul 10, 2004 8:53 am

How can I set different pointer styles or LinePen for different indexes in a line series in VB.NET?

For instance I would like to have even segments red and odd ones green in an alternate way. Same with circle and square pointers.

Help please!!

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Jul 12, 2004 5:21 pm

Hi,

you should be able to do this using the OnGetPointerStyle event (setting pointer Visible to true). The problem is that there's a bug in the drawing algoritm and does not paint correct pointers for individual points. It's added on our defect list and a fix for it will be considered to inclusion for the next maintenance releases. I meantime I've not found any workaround.

Glenn F. Henriksen
Newbie
Newbie
Posts: 52
Joined: Tue Mar 04, 2003 5:00 am

Is this fixed in the August 1 release ?

Post by Glenn F. Henriksen » Tue Aug 10, 2004 3:43 am

Pep wrote:Hi,

you should be able to do this using the OnGetPointerStyle event (setting pointer Visible to true). The problem is that there's a bug in the drawing algoritm and does not paint correct pointers for individual points. It's added on our defect list and a fix for it will be considered to inclusion for the next maintenance releases. I meantime I've not found any workaround.
Hi,

Is this fixed in the August 1 release (OnGetPointerStyle event) ? Can you provide an example of how to use it ?

Thanks.

KSB

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Tue Aug 10, 2004 6:25 am

Hi.

Sure, here is C# example, using series OnGetPointerStyle event:

Code: Select all

    private void Form1_Load(object sender, System.EventArgs e)
    {
      points2.FillSampleValues(10);
      points2.Pointer.Pen.Color = Color.Blue;
    }

    private void points2_GetPointerStyle(Steema.TeeChart.Styles.CustomPoint series, Steema.TeeChart.Styles.CustomPoint.GetPointerStyleEventArgs e)
    {
      // if even, yellow, otherwise blue
      if (e.ValueIndex % 2 == 0) points2.Pointer.Pen.Color = Color.Yellow;
      else points2.Pointer.Pen.Color = Color.Blue;
    }
Additionally you can also change individual point Pointer.Style (by accessing e.Style).
Marjan Slatinek,
http://www.steema.com

Post Reply