To switch the axis of a Series

Oystein Bjorke 4 years ago 0
This discussion was imported from CodePlex

heromyth wrote at 2011-08-25 08:39:

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. 

objo wrote at 2011-08-25 09:07:

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!