Skip to content
Advertisement

Plotly waterfall chart won’t show total column if x-axis points are date strings

This displays a waterfall with a total column:

JavaScript

enter image description here

However, if I change the x-axis to date strings then Plotly sees them as dates, converts them and then doesn’t show a total column:

JavaScript

enter image description here

I’ve had a look at all the params for go.Waterfall but I couldn’t see anything that might help.

Is there a way to use date strings and keep the total column?

Advertisement

Answer

If the x-axis is specified as a categorical variable, the total will be displayed.

JavaScript

enter image description here

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement