Custom PointerStyle

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

Custom PointerStyle

Post by gs » Fri Jun 05, 2009 2:55 pm

Hello, Team!

We are using version 2.0 of TeeChart library for our WinForm application.
Is it possible to create custom PointerStyle in addition to values in PointerStyles enum. Actually i'm interested in semi-sphere figure.

If it's not possible then is it possible to distinguish points on the same line in some other way - for example with blur, glow, canvas or with other effects like this for version 2.0.

Tnanks!

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

Post by Narcís » Fri Jun 05, 2009 3:52 pm

Hi gs,

Yes, you can implement your own series inheriting from existing Points series and changing its draw method, someting as in the example I posted here:

http://www.teechart.net/support/viewtopic.php?t=4309
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 » Mon Jun 08, 2009 6:51 am

Thanks, quite helpful but actually I would like to see not another line with custom drawing (or pointer style)
but line with different styles based on "state" of the concrete point, something like this in pseudocode:

Code: Select all

private void GetPointerStyle(Steema.TeeChart.CustomPointSeries series, Steema.TeeChart.CustomPointSeries.GetPointerStyleEventArgs e)         
 {
    if (someCondition())
   {
      e.Style = PointerStyles.Triangle;
   }
   else
   {
      ApplyMyCustomStyleForPoint(e)
   }
 }
If it's possible to customize the appearance in some other way (with another effects), I would appreciate it.

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Mon Jun 08, 2009 9:59 am

Hi gs,

In v2009 there is ImagePoint series that would allow you to do something as follows:

Code: Select all

Image original;
private void InitializeChart()
{
    ImagePoint points1 = new ImagePoint(tChart1.Chart);
    points1.FillSampleValues(25);

    original = points1.PointImage;
    points1.GetImage += new GetImageEvent(points1_GetImage);
}

void points1_GetImage(CustomImagePoint sender, int valueIndex, Image image)
{
    if (valueIndex == 10)
    {
        ((ImagePoint)sender).PointImage = Image.FromFile(@"C:\temp\mypointer.jpg");
    }
    else
    {
        ((ImagePoint)sender).PointImage = original;
    }
}
In v2 I'm afraid that the only solution is to create your own series as Narcís pointed to you before because PointerStyles is an enum defined into the Steema.TeeChart.Styles namespace.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply