Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Victory Stack horizontal={true} Same axis labels on both axises #1100

Closed
Utzel-Butzel opened this issue Aug 22, 2018 · 2 comments · Fixed by #1104
Closed

Victory Stack horizontal={true} Same axis labels on both axises #1100

Utzel-Butzel opened this issue Aug 22, 2018 · 2 comments · Fixed by #1104
Assignees

Comments

@Utzel-Butzel
Copy link

When editing the stacked-group-chart example on the Victory website ( https://formidable.com/open-source/victory/gallery/stacked-grouped-bars/ ) both axises get the same axis labels when VictoryStack horizontal={true}. This doesn't happen when horizontal={false} or no VictoryStack is used.

bildschirmfoto 2018-08-22 um 12 34 44

class App extends React.Component {

  render() {
    const getBarData = () => {
      return [1, 2, 3, 4, 5].map(() => {
        return [
          { x: 'aaa', y: Math.random() },
          { x: 'bbbb', y: Math.random() },
          { x: 'ccc', y: Math.random() }
        ];
      });
    };

    return (
      <div>
        <VictoryChart domainPadding={{ x: 50 }} domain={{y: [0, 4]}} width={400} height={400}>
    
              <VictoryStack horizontal={true} colorScale={"red"}>
                {getBarData().map((data, index) => {
                  return <VictoryBar key={index} data={data}/>;
                })}
              </VictoryStack>
        
          </VictoryChart>
      </div>
    );
  }
}

ReactDOM.render(<App/>, mountNode);
@boygirl
Copy link
Contributor

boygirl commented Aug 22, 2018

@Utzel-Butzel thanks for reporting this! I am currently working on a bug related to horizontal charts, so I will try to get this one fixed at the same time.

@boygirl
Copy link
Contributor

boygirl commented Aug 30, 2018

This fix was released in victory@30.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants