Set axis to be positive for bar chart

#1

Hello,

I’m using a bar chart and when all y-values are zero, it shows negative values on the y-axis (y-axis shown range is [-1;1] in this case). How can i set a minimal boundary at 0 ?

#2

By setting layout.yaxis.rangemode: 'tozero' like in https://codepen.io/etpinard/pen/PmWyOo?editors=0010

1 Like
#3

It works, thanks @etienne