vue-bar icon indicating copy to clipboard operation
vue-bar copied to clipboard

Bars grow from top to down instead of bottom up

Open jakebesworth opened this issue 4 years ago • 4 comments

On the website: https://deviavir.github.io/vue-bar/ the bars load vertically, from bottom (0), to top of the value range (say, 12).

However in practice: https://jsfiddle.net/1bvxyjhk/ (example in README)

The bars load vertically as expected, but from top to bottom (which seems a bit more awkward).

This seems to happen in 1.5.0 but not earlier versions.

Some possible solutions:

  1. Fix so bars load from bottom to top as before
  2. Fix so that negative bars load from 0 to their value, and positive bars 0 to their value
  3. Have option for which direction bars load vertically, and as mentioned in another issue possibility to load them horizontally

jakebesworth avatar Oct 13 '19 02:10 jakebesworth

@zombiesplat any idea ? It seems this bug was introduced since we handled negative bars

smknstd avatar Jun 07 '20 19:06 smknstd

It would make sense as the change for negative bars was to take off the mirror mode as seen here. https://github.com/DeviaVir/vue-bar/compare/0.1.3...0.1.6#diff-ce8c87c4139f081251c4de3da773df2bL144

the scale(1,-1) inverted the y axis and therefore putting 0,0 at the bottom left instead of the top left

I would say that if we can separate the labels in to their own svg or basically separate the concerns of drawing the graph area and the label area, that would allow the graph area to be inverted again, so that way it would animate from the bottom up.

zombiesplat avatar Jun 07 '20 21:06 zombiesplat

Would be great to fix this, any update on this?

DavidGolodetsky avatar Jan 19 '21 09:01 DavidGolodetsky

Sorry I don't think so

smknstd avatar Jan 20 '21 14:01 smknstd