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

Stacked rounded bar chart with positive and negative and rounded on top and bottom. #5413

Closed
uffou opened this issue Apr 13, 2018 · 3 comments

Comments

@uffou
Copy link

uffou commented Apr 13, 2018

I can't seem to find a complete solution for this and I also wonder why it isn't an option included in the library? Anyways, could someone help me out with this? I need to create a stacked bar chart with both positive and negative values. Rounded only the top and bottom parts. Also, some data points could be 0.

Here is the closest I came up with from various examples.

https://jsfiddle.net/uffo/5oty49r3/6/

And here is what I need to achieve
image

Any help would be much appreciated :)

@etimberg
Copy link
Member

This would be a nice thing to have in the library in the future. For non stacked bars it's fairly trivial as its just some rounding at the end of the bar that is not the base.

In terms of doing this cleanly, I think it would be best to have some sort of corner radius added to each bar element by the controller. The controller may have a better idea of where in the stack a bar is.

@Jitendra94
Copy link

Hi @uffou,

I have same issue for dataset with 0 at end.
please help if you found any solution.

Thank you in advance for any advice.
Jitendra

@etimberg
Copy link
Member

etimberg commented Feb 21, 2021

Using the built-in borderRadius property in v3 coupled with the fact that nearly everything is scriptable starting in v3.0.0-beta.11, this is quite easy to do now.

Edit:
Fully working implementation in https://jsfiddle.net/7sh342wj/1/

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

3 participants