haskell-chart icon indicating copy to clipboard operation
haskell-chart copied to clipboard

bar chart with a single cluster renders all bars on top of each other

Open harendra-kumar opened this issue 7 years ago • 2 comments

When using two or more clusters in the chart the width and placement of the bars is correct. But when we have just a single cluster in the whole chart it renders very badly, the chart is unusable in that case.

See these examples:

Any idea what's wrong here? Is there a workaround for this problem?

harendra-kumar avatar Apr 08 '18 12:04 harendra-kumar

I could workaround this issue by adding another cluster with no data points i.e. [([], [])]

harendra-kumar avatar Apr 08 '18 12:04 harendra-kumar

Yikes. Thanks for the bug report. It's probably not too hard to fix this end-case, though I might not get to it for a while. I'd be happy to receive a patch - the relevant code is in Chart/Plot/Bars.hs:renderPlotBars.

timbod7 avatar Apr 08 '18 23:04 timbod7