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

Bar charts with different column widths #3204

Closed
wltrup opened this issue Jan 22, 2018 · 5 comments
Closed

Bar charts with different column widths #3204

wltrup opened this issue Jan 22, 2018 · 5 comments

Comments

@wltrup
Copy link

wltrup commented Jan 22, 2018

Hi Daniel.

I'd like to create a bar chart where the columns have different widths.

From what I can tell, BarChartDataEntry only has initialisers with a single value of x, the centre value of the column for the corresponding data point, and the common width of all columns is set using BarChartData's barWidth method.

Is there a way to create such a chart? I was expecting an initialiser along the lines of init(xmin: Double, xmax: Double, y: Double) and was surprised not to find one.

Thanks!

@wltrup wltrup changed the title Bar charts with variable column widths Bar charts with different column widths Jan 22, 2018
@vilapuigvila
Copy link

Hi, I'm in the same situation..

@liuxuan30
Copy link
Member

it's not supported with different bar width. you can try create one and file a PR. We would be grateful to review and merge.
But before doing that, I don't see it's very reasonable or popular to see different width bars.

@jessicafrank204
Copy link

@wltrup @vilapuigvila
Hi, I'm also looking to create a chart with different bar widths. Were you able to solve this issue? Thanks.

@wltrup
Copy link
Author

wltrup commented Feb 20, 2018

@jessicafrank204 @vilapuigvila

Our workaround is to render several bars next to each other, all with the same height, to simulate a single bar of that height and a custom width.

@jessicafrank204
Copy link

@wltrup
Ok, thank you.

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

4 participants