To switch the axis of a Series

Aug 25, 2011 at 6:39 AM
Edited Aug 25, 2011 at 6:45 AM

It seems it is the only way to switch the axis of a series that is to use the Key property of the axis like these:

            series.XAxisKey = xAxis.Key;
            series.YAxisKey = yAxis.Key;

So, it requires the Key must be defined as a unique string firstly. What happened for switching the axis directly, like these:

            series.XAxis = xAxis;
            series.YAxis = yAxis;

I have nearly 20  X-Axis and a Y-Axis, each series is assocated with a X-Axis and the same Y-Axis.


The Points of a series also can't be setted now, then, it's a limitation for using custom storage which implements the interface of IList.

Thanks for using List<IDataPoint> as its inner storage. 

Aug 25, 2011 at 7:07 AM

right, you should use the axis keys to reference axes, I think it is safer than setting the references directly, so I removed that option. 

I reintroduced the DataPointSeries.Points setter again, I see it can be good for performance!