ChangeType doesn´t preserve order of X values?
Posted: Thu Sep 21, 2006 4:01 pm
Hi,
When I use the Series.ChangeType method on a series, that already has specific ordering set for the X values, this ordering is not preserved while changing to another type.
I´m using the stable v2.0.2306.26232 version of the library. Didn´t find a bugfix that fixes it in the latest Debug build (in the release notes).
Regards
[/code]
When I use the Series.ChangeType method on a series, that already has specific ordering set for the X values, this ordering is not preserved while changing to another type.
Code: Select all
Series mySeries = tChart.Series.Add(typeof(FastLine));
mySeries.XValues.Order = ValueListOrder.None;
// Append a couple of points
Random rnd = new Random();
for (int pointIndex = 0; pointIndex < 10; pointIndex++)
{
mySeries.Add(rnd.NextDouble(),rnd.NextDouble());
}
--> this would result in a plot showing random lines
// Change the plot type
Series.ChangeType(ref mySeries, typeof(Line));
--> this results in lines that are ordered according to X-axis value (default ascending ordered)
Regards
[/code]