-
Notifications
You must be signed in to change notification settings - Fork 794
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
waterfall chart #1736
Comments
It's possible, but takes a lot of tweaking (it would basically mirror the vega-lite at the link you shared, including the nine transform definitions). |
Thanks |
For future people that arrive here via Google, here is an implementation of the vega lite waterfall chart in Altair. There were some changes I needed to make on the input data to make sure things looked right (i.e. setting a custom "order" field, and also a custom "plus minus" field for the bar colors since Altair doesn't seem to allow you to chain the conditions together. The original example also named different transformed calculations and window fields and raw data the same (i.e. there's a calcualted field called "amount" and also in the raw data the field is "amount"), which was confusing to me, so I made my names more verbose and explicit to reduce confusion.
|
Nice! Feel free to submit a PR adding this to the example gallery if you want @yanghung. I'm reopening for considering adding this to the gallery. |
@joelostblom can you link me to the repo location where gallery examples are? |
Here is an sample PR of how to add an example to the gallery https://github.com/altair-viz/altair/pull/2519/files |
@joelostblom first time contributing to this community (thank you for all the work you do btw!), let me know if there's anything off formatting wise, but I tried to follow your example PR |
Closing this as #2621 got merged |
https://vega.github.io/vega-lite/examples/waterfall_chart.html
How to create waterfall chart in altair with data from pandas.thanks
The text was updated successfully, but these errors were encountered: