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

Bar not showing in barchart when range is specified

Open saimaparveen opened this issue 9 years ago • 2 comments

Hi,

Unable to see bar when there is 1 bar and range specified in barchart. https://codepen.io/anon/pen/KXeoWZ

if there is more than 1 bar then its visible. https://codepen.io/anon/pen/yzEKoj

Is there any way I can show bar in the first case

Thanks, Saima

saimaparveen avatar Oct 11 '17 13:10 saimaparveen

That bar is showing, it is simply very very very tiny. After zooming in a little bit, we get:

image

To be precise, it has a width of 1 millisecond (the default value) - which on your set range get ignored but most browsers.

By setting the width to e.g. 12 hours https://codepen.io/etpinard/pen/oGyqJj?editors=0010 your bar is visible again.


Related https://github.com/plotly/plotly.js/issues/1181

etpinard avatar Oct 11 '17 14:10 etpinard

duplicate of https://github.com/plotly/plotly.js/issues/1346

alexcjohnson avatar Oct 11 '17 15:10 alexcjohnson