Series ChangeType

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Adrian
Newbie
Newbie
Posts: 13
Joined: Fri Dec 10, 2004 5:00 am
Location: Canberra Australia
Contact:

Series ChangeType

Post by Adrian » Sat Dec 18, 2004 2:23 am

Some series types have similar attributes, Area and Line for instance. I would like to be able to switch the series between these two types. I thought the Series.ChangeType method would do this but it appears to replace the existing series with a new one, all attributes of the existing series such as data source and data members, custom axis etc. seem to be erased.

some data from the watch window

BEFORE change type
m_series {Steema.TeeChart.Styles.Line} steema.TeeChart.Styles.Series
CustomVertAxis {Steema.TeeChart.Axis} Steema.TeeChart.Axis
Title "batchavg" String
DataMember "batchavg" String


Steema.TeeChart.Styles.Series.ChangeType(m_series, GetType(Steema.TeeChart.Styles.Area))


AFTER change type

m_series {Steema.TeeChart.Styles.Area}steema.TeeChart.Styles.Series
CustomVertAxis Nothing Steema.TeeChart.Axis
Title "batchavg" String
DataMember "" String

So it appears to change the types correctly and it does remember some stuff through the change ie. Title. but it doesn't keep most of the other properties.

Is this a problem or is there some other method of changing series types?

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

Post by Pep » Tue Dec 21, 2004 12:41 pm

Hi Adrian,

yes, you're correct, it sems to be a bug, it should keep these attributes changing the Series type. I've added it on our defect list and a fix for it will be considered to inclusion for the next maintenance releases.

Post Reply