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 · 1 comment
Open

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

mhkeller opened this issue Mar 19, 2024 · 1 comment
Labels
example-related help wanted Extra attention is needed

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...

@mhkeller mhkeller added awaiting-merge Finished in a branch, will be included in next release and removed awaiting-merge Finished in a branch, will be included in next release labels Jun 23, 2024
@mhkeller
Copy link
Owner Author

mhkeller commented Aug 9, 2024

After looking into this a bit, supporting all cases is a little tricky to handle in the component itself.

@mhkeller mhkeller added the help wanted Extra attention is needed label Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
example-related help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant