Page 1 of 1

Point visible in some values and not in others

Posted: Wed May 19, 2010 8:25 am
by 15654539
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

Re: Point visible in some values and not in others

Posted: Wed May 19, 2010 10:35 am
by yeray
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.

Re: Point visible in some values and not in others

Posted: Wed May 19, 2010 10:58 am
by 10050769
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,