Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Remove ColumnSeries #1402

Copy link
Copy link
@Jonarw

Description

@Jonarw
Issue body actions

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:

image
image

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 BarSeriesBase and BarSeriesBase<T>, move functionality to BarSeries
  • Remove BarItemBase, move functionality to BarItem
  • Remove ColumnSeries, ColumnItem
  • Rename ErrorColumnSeries to ErrorBarSeries and make it inherit from BarSeries
  • Fix BarSeries to work in transposed mode (as shown above)
  • Remove ColumnSeries examples
  • Add transposed versions of BarSeries examples

What do you think? Did I miss something? Is it worth it?

VisualMelon

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.