plotly.js icon indicating copy to clipboard operation
plotly.js copied to clipboard

Add option to not leave gaps in grouped bar chart

Open etpinard opened this issue 10 years ago • 7 comments

See http://community.plot.ly/t/grouped-bar-chart-leaves-gap-when-a-trace-has-missing-element-for-a-one-or-more-xaxis-tick/2078 for more context info.

Maybe we should add a new barmode e.g. 'grouped-no-gaps' ?

etpinard avatar Sep 12 '16 17:09 etpinard

+1

grouped no gaps would be very nice for my particular application. Ties my hands a bit if I have to force that all groups have values for all X-values. Current workaround for me is to make custom x-axis label (e.g., if you have x values A, B, C, D and groups (i.e., traces) 1,2 - I make new groups --> A1, A2, B1, B2, C1, C2, D1, D2, apply custom colors so that 1,2 are different colors. It works, but the x-axis labels get very cluttered.

screen shot 2018-04-10 at 12 41 11 pm

yniknafs avatar Apr 10 '18 16:04 yniknafs

Any updates on this issue?

Thanks and have a nice day.

ozandogrultan avatar Apr 03 '19 13:04 ozandogrultan

Please fix this issue.

sourcecode369 avatar Apr 01 '21 08:04 sourcecode369

I'd also love a new mode for this!

Numeri avatar Oct 12 '22 10:10 Numeri

If anyone found a solution to ignore bars with empty values so they don't group invisibly it would be cool to share.

Braintelligence avatar Nov 01 '22 12:11 Braintelligence

Sorry for necroing this a bit but I'm still looking for a solution here. Did anyone find one in the meantime?

EDIT: Hah, I found a workaround with the help of offsetgroup to achieve what I wanted to do; albeit a bit tricky.

Braintelligence avatar Nov 04 '23 15:11 Braintelligence

Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson

gvwilson avatar Jun 05 '24 17:06 gvwilson