FormidableLabs / victory

A collection of composable React components for building interactive data visualizations
http://commerce.nearform.com/open-source/victory/
Other
11.02k stars 524 forks source link

When using singleQuadrantDomainPadding, the Y axis is broken #2037

Closed amromusharaf closed 8 months ago

amromusharaf commented 2 years ago

Bugs and Questions

Checklist

The Problem

Hi team 👋 Love the work you've been doing with Victory; I am a huge fan! I've come across what I believe might be a bug, and am hoping for a helping hand:

When creating a grouped Bar chart, and using singleQuadrantDomainPadding, the Y axis seems to break, and appears to load within the chart space itself. Is this something of which you're already aware, maybe?

Reproduction

Please find a reproduction of the issue here: https://codesandbox.io/s/intelligent-feistel-xflfm?file=/src/App.js:424-451

Notice how orientation is set to right on the VictoryAxis, but is not being applied.

If you remove singleQuadrantDomainPadding prop, the issue no longer presents. In my case, it is needed to avoid the bars overlapping the left edge, however

My current workaround is to pass a custom VictoryLabel component into VictoryAxis, and apply some offset (dx) manually to it.

recidive commented 2 years ago

I think what I'm getting is related. I could reproduce it in a Victory documentation snippet.

Screen Shot 2021-12-26 at 17 11 36

Before upgrading to the latest version the Y axis used to show up on the right of the chart. Just like it is when it's not a child of a VictoryChart component.

carbonrobot commented 8 months ago

Unable to reproduce in latest version. Please reopen if the issue persists.