Series Borders

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Eamon
Newbie
Newbie
Posts: 3
Joined: Wed Jun 23, 2004 4:00 am
Location: Brisbane, Australia

Series Borders

Post by Eamon » Fri Dec 08, 2006 6:01 am

Is there some general object to programmatically give any series a border? Something like Series.Border.Width = 5 and so on.

I am unable to find such an object. Is it specific to the type of the series (i.e. Bar, Line etc), and if thats the case, how do I access it.

Thank you for your assistance.

Information:
Using TeeChart .NET 1.1

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Dec 08, 2006 3:21 pm

Hi,

yes, you can do :
(tChart1.Series[0] as Steema.TeeChart.Styles.Bar).Pen.Width = 5;

Eamon
Newbie
Newbie
Posts: 3
Joined: Wed Jun 23, 2004 4:00 am
Location: Brisbane, Australia

Series Borders

Post by Eamon » Mon Dec 11, 2006 1:02 am

But will this work for any generic series? i.e. Lines, Bars, etc? I know I can cast it as a Bar type, but will it give the same general behaviour if the actual object is of a different type.

Failing that, perhaps a better question would be what is the easiest way to give a series of some description (whether it be bar or line or something else) a highlight on the chart. Something easily turned on and off, to indicate to the user that this series (or multiple series) are going to be affected by changes.

Thanks for the help.

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Mon Dec 11, 2006 7:16 am

Hi.
But will this work for any generic series? i.e. Lines, Bars, etc? I know I can cast it as a Bar type, but will it give the same general behaviour if the actual object is of a different type.
Not all series have border property so this can't be generic (i.e. introduced as public property for base series class).
That's why you have to check series type before you type cast to it. Something like this:

Code: Select all

if (tChart.Series[0] is Steema.TeeChart.Styles.Bar)
  (tChart.Series[0] as Steema.TeeChart.Styles.Bar).Pen.Width = 5;
Something easily turned on and off,
It depends. I'd maintan the list of "changed" series outside tChart (perhaps array/list storing indexes of changed series) and then use it to change indexed series properties (like pen width, etc...).
Marjan Slatinek,
http://www.steema.com

Post Reply