Group: Forum Members
Last Active: 15 Years Ago
Posts: 13,
Visits: 1
|
Good Afternoon,
I have a property name ChartSeries which is of the NSeriesBase type and a SelectedSeriesType property of type SeriesType.
My plan was to have a dropdown list, containing all the entries in the SeriesType enumeration and for the series to be of the selected type.
For example, ChartSeries = nChartControl.Charts[0].Series.Add(SelectedSeriesType);
It all seemed to work, although I noticed, when enabling 3D charts, that the z value is not implmented and that the points or bars etc are all in a straight line on the z axis at zero. Finally, I realised the reason being I needed to set UseZValues to true. This all sounds easy, except, of coarse, the ChartSeries property needs to specifically be of type NBarSeries or NPointSeries etc in order to set the OrderZValues property.
My question is, how can I mask the NSerisBase property to the type of the selected chart type in order to be able to set UseZValues to true?
Any help would be greatly appreciated.
Thankyou in advance,
David
|
Group: Forum Members
Last Active: 15 Years Ago
Posts: 13,
Visits: 1
|
Good Afternoon, Once Again,
As per my previous post, at the moment the only way around my problem I have thought of was using a switch statement, consisting of a case statement for the chart types containing the UseZValues property, making a variable of that chart type, adding the series, setting UseZValues to true and setting my ChartSeries property to that series variable.
This seemed to work, if anybody has a better idea, by all means post your reply.
David
|