Plotly.js: Null values show up as thin bars in Bar chart if you set an axis range including 0.

Created on 20 Jan 2020  路  4Comments  路  Source: plotly/plotly.js

If you have null values in y, those show up as thin bars in Bar chart if you set an axis range that includes 0.

image

Here is a pen.

https://codepen.io/kei51/pen/KKwraMX

It doesn't happen on an older version of Plotly like 1.47.4.

https://codepen.io/kei51/pen/XWJypEO

bug

All 4 comments

Thanks for reporting!

This should have been fixed as part of https://github.com/plotly/plotly.js/pull/4056 unless I'm missing something. @archmoj can you comment?

Hmm... this demo using #4056 renders OK.
The problem should be caused by another PR in 1.48.0
Investigating...

Improved bug demo.
This is only a problem in interactive mode. Download PNG works OK (does not show empty bars).
Related to this block: https://github.com/plotly/plotly.js/blob/8122c2127c12b50cb20207d676aa24e3a786f305/src/traces/bar/plot.js#L193-L201

Thank you very much for the fix!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chriddyp picture chriddyp  路  3Comments

WG- picture WG-  路  3Comments

nicolaskruchten picture nicolaskruchten  路  3Comments

pynklu picture pynklu  路  3Comments

jonmmease picture jonmmease  路  3Comments