Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stacked waterfall charts #4450

Open
nicolaskruchten opened this issue Dec 29, 2019 · 10 comments
Open

Stacked waterfall charts #4450

nicolaskruchten opened this issue Dec 29, 2019 · 10 comments
Assignees

Comments

@nicolaskruchten
Copy link
Member

broken off from #2221 ...

Let’s gather up some requirements for stacked waterfalls here, ideally including screenshots of the desired output.

@nicolaskruchten
Copy link
Member Author

I see at least two variants:

  1. Multiple distinct waterfall traces that must have the same x and measure and sign for all y (could be implemented with a waterfallmode of stack)
  2. The ability for a single trace to have multiple y values (of the same sign) for a given x (could be implemented with no new attributes in principle?)

@nicolaskruchten
Copy link
Member Author

In principle we could apply the same stacking/overlapping rules we have for bar in both cases... ugly but well-defined.

And for case 1, we would just always use the measure from the first trace in a given subplot, to avoid conflicts.

@jdb78
Copy link

jdb78 commented Dec 30, 2019

I like the multiple traces with waterfallmode="stack" as it is consistent with other other trace types.

  1. if the y values are of different sign, we could show something like this:
    image

  2. We only stack for overlapping x (consistent with bar) and measure

  3. We allow null values for y which prevents the any hover animations

What are your thoughts?

@nicolaskruchten
Copy link
Member Author

Your case 1 above would actually be closer to waterfallmode="relative" to match the current barmode="relative" case... it's kind of ugly but it has a certain logic to it I'll admit :)

@nicolaskruchten nicolaskruchten added this to the v1.54.0 milestone Feb 17, 2020
@nicolaskruchten nicolaskruchten modified the milestones: v1.54.0, v1.55.0 Mar 15, 2020
@whippysundew
Copy link

Hi Everyone,

I am very interested in the possibility of a Plotly Stacked Waterfall. The image posted by jdb78 is exactly what I am looking for. I think this solution would fill a large gap in Python’s data visualization capabilities and attract more developers to Plotly.

Can you please advise me on how I can make this dream become a reality? :)

Thank you

@alexcjohnson
Copy link
Collaborator

@whippysundew I think we still need a little more information about the kind of data it would be useful to represent with such a stack, and come to a consensus on the API for this that's most consistent with our other traces such as bar. After that we can look back at previous waterfall PRs such as #3531 to see where the code needs to be amended.

@whippysundew
Copy link

@alexcjohnson thank you for your insight. Let’s use software sales data as an example with waterfall columns as follows: YTD revenue (+), won business yet to hit revenue (+), net pipeline (pipeline + business at risk, + or -), total projected performance (+). The stack would be helpful to display different regions or lines of business while still representing the total performance. It would be very beneficial to allow positive or negative values in each column - say one region has a positive net pipeline while another is negative. The chart above shows how this can be displayed.

@etiennecelery
Copy link

Definitely a useful feature to add, I was trying to showcase the capital returns of multiple companies, so you have initial assets in t0 and final assets in t1, just like the Plotly waterfall example. It would be great if those initial and final bars could be dissagregated into multiple stacked bars. Just a thought.

@NolsN74
Copy link

NolsN74 commented Nov 14, 2023

any news on this issue?

@yogeshriyat
Copy link

Hi any update on this stacked waterfall chart?

@gvwilson gvwilson self-assigned this Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants