Point visible in some values and not in others

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
acastro
Advanced
Posts: 204
Joined: Tue Oct 27, 2009 12:00 am

Point visible in some values and not in others

Post by acastro » Wed May 19, 2010 8:25 am

Hello,

If I set points visible in a serie, it shows points in all the values of the serie.
Is it possible to show the points only in some points programming?


Thanks in advance

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

Re: Point visible in some values and not in others

Post by Yeray » Wed May 19, 2010 10:35 am

Hi wakeup,

You can use null points to hide those you want. Add your points with Color.Transparent or change their state with SetNull method.
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

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

Re: Point visible in some values and not in others

Post by Sandra » Wed May 19, 2010 10:58 am

Hello wakeup,

I suggest other option using GetPointerStyle that I think you could use it too, if you want. Please, see next code and check if works as you want.

Code: Select all

public Form1()
        {
            InitializeComponent();
            InitializeChart();
        }
        private Steema.TeeChart.Styles.Line line1;
        private void InitializeChart()
        {
            line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
            line1.FillSampleValues(10);
            line1.Pointer.Visible = true;
            line1.GetPointerStyle += new Steema.TeeChart.Styles.CustomPoint.GetPointerStyleEventHandler(line1_GetPointerStyle);
        }
        void line1_GetPointerStyle(Steema.TeeChart.Styles.CustomPoint series, Steema.TeeChart.Styles.GetPointerStyleEventArgs e)
        {
            if (e.ValueIndex < 3)
            {
                e.Style = Steema.TeeChart.Styles.PointerStyles.Nothing;
            }
            else
            {
                e.Style = Steema.TeeChart.Styles.PointerStyles.Rectangle;
            }
        }
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

Post Reply