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

examples: Modify components to support negative bars and columns #181

Open
mhkeller opened this issue Mar 19, 2024 · 0 comments
Open

examples: Modify components to support negative bars and columns #181

mhkeller opened this issue Mar 19, 2024 · 0 comments

Comments

@mhkeller
Copy link
Owner

Pretty easy fix here. On the column chart make these two adjustments:

 $: columnHeight = d => {
    return Math.abs($yGet(d) - $yScale(0) );
  };

and

y="{Math.min($yScale(0), $yGet(d))}"

Pretty similar for the bar chart component. Not sure if these need to be added to the stacked components? That seems like a weird chart type...

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

No branches or pull requests

1 participant