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

Charts with datasets having negative values (4th quadrant) break #261

Open
Abhinandan-Kushwaha opened this issue Aug 16, 2022 · 3 comments

Comments

@Abhinandan-Kushwaha
Copy link
Owner

When the dataset has a mix of both +ve and -ve values, such that some part of chart falls in the 4th quadrant, the chart breaks. This issue is common in both Line and Area charts.

To Reproduce
Steps to reproduce the behavior:

  1. Have a data set with some -ve values
  2. Run the project
@Abhinandan-Kushwaha Abhinandan-Kushwaha changed the title Charts with datasets having negative values (4th quadrant) breaks Charts with datasets having negative values (4th quadrant) break Aug 16, 2022
@mayfairr
Copy link

mayfairr commented Dec 3, 2023

@Abhinandan-Kushwaha any update on this?

@Abhinandan-Kushwaha
Copy link
Owner Author

Please share the code with screenshot

@christophby
Copy link
Contributor

christophby commented Dec 14, 2023

@Abhinandan-Kushwaha Thank you for building this library!
Here is an example of the breaking bar chart which breaks as soon as we got at leat one negative value

const stackData = [
    {
      label: 'Dez',
      stacks: [
        {
          value: 15,
          color: '#0aaa17',
        },
        {
          value: -5,
          color: '#ffa600',
        },
        {
          value: 10,
          color: '#003f5c',
        },
      ],
    },
  ];
image

What I'm expecting in this case

  • Two stacked bars (15+10=25) positive
  • One bar (-5) negative below x-axis

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

No branches or pull requests

3 participants