pointer color style

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
lolo
Newbie
Newbie
Posts: 11
Joined: Thu Jan 08, 2009 12:00 am

pointer color style

Post by lolo » Sat Oct 01, 2011 12:53 pm

Hi Forum

Im plotting a curve with point style "cross" and another with style "star" and I want to change the color of the point style because always is black; but I couldn't do it.

When the style if a shape i can change the color with

line.Pointer.Color = Color.red

but it dont work for the style "cross", "star" and "dot". I need do it by code, no for the editor.

How can I do it?

Thankyou

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

Re: pointer color style

Post by Sandra » Mon Oct 03, 2011 8:40 am

Hello lolo,

Using last version of Teechart.Net and next code, your problem doesn't appears:
Steema.TeeChart.Styles.Line series1,series2;

Code: Select all

  private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            series1 = new Line(tChart1.Chart);
            series2 = new Line(tChart1.Chart);
            series1.Pointer.Visible = true;
            series2.Pointer.Visible = true;
            series1.Pointer.Style = PointerStyles.Cross;
            series1.Pointer.Color = Color.Red;
            series2.Pointer.Style = PointerStyles.Star;
            series2.Pointer.Color = Color.Blue;
            series2.FillSampleValues();
            series1.FillSampleValues();
        }
Can you please, tell us which version of TeeChart.Net are you using? If you using last version please modify the code so we can reproduce your problem.

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

lolo
Newbie
Newbie
Posts: 11
Joined: Thu Jan 08, 2009 12:00 am

Re: pointer color style

Post by lolo » Mon Oct 03, 2011 6:23 pm

Hi Sandra

I'm using the version for visual studio 2008 (teechart v3).

and i have tested the code you gave me, but it doesnt work in my version.

how i can solve this problem?

Thankyou

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

Re: pointer color style

Post by Sandra » Tue Oct 04, 2011 1:40 pm

Hello lolo,
Seems there are some changes in version 4 respect to version 3. If you want change color of your pointer in last version 3 of TeeChart.Net, you must change Color.Pen property of pointer. As do in following lines:

Code: Select all

        series1.Pointer.Pen.Color = Color.Red;
            series2.Pointer.Pen.Color = Color.Blue;
Can you please, tell us if your problem is solved, using previous lines of code?

I hope 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

lolo
Newbie
Newbie
Posts: 11
Joined: Thu Jan 08, 2009 12:00 am

Re: pointer color style

Post by lolo » Thu Oct 06, 2011 4:50 pm

HI Sandra

I Have made what you told me, and it works perfectly.

Thankyou

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

Re: pointer color style

Post by Sandra » Fri Oct 07, 2011 7:05 am

Hello lolo,

I am glad that solution I suggest works for your :).

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

Post Reply