Gaps between bars in barchart


#1

Hi,
how can I remove gaps in barcharts, like in this example:
https://plot.ly/~marcin.wojciechowski.gd/1/.
or
https://codepen.io/morris4life/pen/rYyLdj


#2

By gaps, you mean the bars with no height?


#3

Hi thanks for replay.
Lets look at the barchart from 1st link - there is a gap for value_2 - its missing the orange bar - but must there be that gap? Can we just remove the empty space so that blue and green bars will be next to each other.

Also in this link, in case you have 2 axes - why bars assigned to 2nd axis have different tickness than the bars from the 1st axis?


#4

Also I have found that its not a problem with multiple axes. It even happen with single axes:

Why there is so much empty space between the bars for 1, 2 and 3 x value?!


#5

Because bars with height=0 still hold a position in plotly.js.

See https://github.com/plotly/plotly.js/issues/930 for more info.