Page 1 of 1

Line Series - Points Only?

Posted: Mon Dec 07, 2009 4:08 pm
by 13045625
I want to toggle a line series between displaying as a line, and displaying the points only. Can I achieve this by using the line series only or do I have to change the series style from a line series to a point series.

Re: Line Series - Points Only?

Posted: Tue Dec 08, 2009 9:50 am
by 13045625
I found a way to do what I wanted. See below:

Code: Select all

public void ToggleShowSeriesLines(bool bVisible)
        {
            foreach (Steema.TeeChart.Styles.Series ts in _tcChart.Series)
            {
                if (ts is Steema.TeeChart.Styles.Line)
                {
                    if (!bVisible)
                    {
                        ((Steema.TeeChart.Styles.Line)ts).LinePen.Visible = false;
                        ((Steema.TeeChart.Styles.Line)ts).Pointer.Visible = true;
                    }
                    else
                    {
                        ((Steema.TeeChart.Styles.Line)ts).LinePen.Visible = true;
                        ((Steema.TeeChart.Styles.Line)ts).Pointer.Visible = false;
                    }
                }
            }
        }