Pointer.Transparency behaviour

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
gs
Newbie
Newbie
Posts: 84
Joined: Mon Mar 20, 2006 12:00 am
Location: US

Pointer.Transparency behaviour

Post by gs » Tue Jun 09, 2009 4:25 pm

Hi, team. I'm using version 2.0 of Teechart library.

I would like to write code like this

Code: Select all

 private void Test()
{
  Points points = new Points();
  ...
  points.GetPointerStyle += SomeMethod;
}

 private void SomeMethod(CustomPoint series, CustomPoint.GetPointerStyleEventArgs e)
{
   if (someCondition)
  {
    series.Pointer.Transparency = 100; 
  }
  else
  {
    series.Pointer.Transparency = 0;
  }
}
Suddenly it works only for every point except the first one. Could you help me to undertand the problem here or provide the workaround for this issue if possible?

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Post by Sandra » Wed Jun 10, 2009 10:11 am

Hello gs,


In version 2 if you want change some propierty color pointer, you needs event, but the first value of series you can change before event for example:

Code: Select all

 private void Test()
{
  Points points = new Points();
  ...
   points.Pointer.Transparency = 100;
  points.GetPointerStyle += SomeMethod;
} 

 private void SomeMethod(CustomPoint series, CustomPoint.GetPointerStyleEventArgs e)
{
   if (someCondition)
  {
    series.Pointer.Transparency = 100;
  }
  else
  {
    series.Pointer.Transparency = 0;
  }
} 
I hope that will helps.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

gs
Newbie
Newbie
Posts: 84
Joined: Mon Mar 20, 2006 12:00 am
Location: US

Post by gs » Wed Jun 10, 2009 11:04 am

Thanks, but I don't know state of the data which is associated with point and at the moment of line creation so I can't decide what to prefer here. Any other suggestions?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Jun 10, 2009 11:13 am

Hi gs,

You should apply that condition to the first series point after adding the value to the series and before the GetPointerStyle event is fired. In v2 that event was not designed for changing pointer's color. This feature was added in v3.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

gs
Newbie
Newbie
Posts: 84
Joined: Mon Mar 20, 2006 12:00 am
Location: US

Post by gs » Wed Jun 10, 2009 2:03 pm

Thank you, works fine now.

Post Reply