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
Series Borders
Hi,
yes, you can do :
(tChart1.Series[0] as Steema.TeeChart.Styles.Bar).Pen.Width = 5;
yes, you can do :
(tChart1.Series[0] as Steema.TeeChart.Styles.Bar).Pen.Width = 5;
Pep Jorge
http://support.steema.com
http://support.steema.com
Series Borders
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.
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.
Hi.
That's why you have to check series type before you type cast to it. Something like this:
Not all series have border property so this can't be generic (i.e. introduced as public property for base series class).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.
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;
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...).Something easily turned on and off,
Marjan Slatinek,
http://www.steema.com
http://www.steema.com