question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Waterfall plot doesn't always plot the right axis range

See original GitHub issue

Depending on the data values, when setting a base (i.e. initial value), the plot doesn’t always adjust the axis range accordingly. For instance, where’s a plot working as expected:

import plotly.graph_objs as go
fig = go.Figure()

fig.add_trace(go.Waterfall(
    y = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'],
    x = [1, 2, 3, -2, -1, 3, -4, 1],
    base = 100,
    orientation='h'
))

fig.show()

image

Now here’s what happens when I change a single value in the data (in this case, I changed the third value from 3 to 1):

import plotly.graph_objs as go
fig = go.Figure()

fig.add_trace(go.Waterfall(
    y = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'],
    x = [1, 2, 1, -2, -1, 3, -4, 1],
    base = 100,
    orientation='h'
))

fig.show()

image

I’m using plotly 4.5.4 and python 3.7.4

Can anyone help me understand what I might be doing wrong or fix this issue?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nicolaskruchtencommented, May 29, 2020

I’m sorry I haven’t followed up on this issue, but it should be resolved in the most recent version of plotly 😃

0reactions
AndreCNFcommented, Jun 1, 2020

@nicolaskruchten Yes, it’s resolved. That’s why I closed this issue. Thanks for the help! 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

Excel Waterfall Chart: How to Create One That Doesn't Suck
Now we have to adjust the scale of the right chart to be the same as the left. Right click on the vertical...
Read more >
Create a Waterfall Chart with Negative Values Crossing ...
When you create a waterfall chart, negative values should cross the horizontal axis when appropriate so really show the visual impact of ...
Read more >
Cascade vs. Waterfall Plots | AMP Maintenance Forums
The ezTOMAS "Waterfall" plot does not linearize the Z-axis speed scale as compared to the Cascade plot from John. The obvious conseguence is ......
Read more >
FAQ-720 When I change the Axis Scale Type of the stacked ...
Sometimes changing Axis Scale Type may dramatically change the plot range displaying in the graph window, such as changing Axis Scale Type from ......
Read more >
Excel 2016 Waterfall Chart - How to use, advantages ... - XelPlus
But they are also a good story teller for non-financial data. The Waterfall Chart is also a very liked graph by Management. For...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found