-
Notifications
You must be signed in to change notification settings - Fork 985
Description
This is kind of a continuation of #1334.
In the discussion for that issue I briefly considered the point that a transposed BarSeries could more or less replace a ColumnSeries. The main differentiation between these two series seems to be the label placement. This however could be easily resolved by a similar approach as was introduced in #1334 for the HistogramSeries:
| protected void RenderLabel(IRenderContext rc, OxyRect clippingRect, OxyRect rect, HistogramItem item) |
As a proof of concept, I modified BarSeries accordingly and tested in in transposed mode:
So this makes me wonder: Is there a compelling reason to keep the ColumnSeries as a separate class when we can get the same plot using a transposed BarSeries?
Immediate Benefits would be:
- Less code duplication
- Simpler API
- Derived Series would automatically also be transposable (e.g.
ErrorColumnSeries) - Easier switching between horizontal and vertical Bars
The main downside is that this would involve quite some breaking API changes. These are the main changes I can think of right now:
- Remove
BarSeriesBaseandBarSeriesBase<T>, move functionality toBarSeries - Remove
BarItemBase, move functionality toBarItem - Remove
ColumnSeries,ColumnItem - Rename
ErrorColumnSeriestoErrorBarSeriesand make it inherit fromBarSeries - Fix
BarSeriesto work in transposed mode (as shown above) - Remove
ColumnSeriesexamples - Add transposed versions of
BarSeriesexamples
What do you think? Did I miss something? Is it worth it?

