Line Series - Points Only?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
jenb
Newbie
Newbie
Posts: 50
Joined: Thu Jun 21, 2007 12:00 am

Line Series - Points Only?

Post by jenb » Mon Dec 07, 2009 4:08 pm

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.

jenb
Newbie
Newbie
Posts: 50
Joined: Thu Jun 21, 2007 12:00 am

Re: Line Series - Points Only?

Post by jenb » Tue Dec 08, 2009 9:50 am

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;
                    }
                }
            }
        }

Post Reply