Page 1 of 1
Series Borders
Posted: Fri Dec 08, 2006 6:01 am
by 8125951
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
Posted: Fri Dec 08, 2006 3:21 pm
by Pep
Hi,
yes, you can do :
(tChart1.Series[0] as Steema.TeeChart.Styles.Bar).Pen.Width = 5;
Series Borders
Posted: Mon Dec 11, 2006 1:02 am
by 8125951
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.
Posted: Mon Dec 11, 2006 7:16 am
by Marjan
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...).