-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 charts #3531
Waterfall charts #3531
Conversation
src/traces/waterfall/attributes.js
Outdated
|
||
width: barAttrs.width, | ||
|
||
marker: extendFlat({}, barAttrs.marker, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have two marker
containers for waterfall traces: one for increasing bars and one for decreasing bars, similar to how ohlc
and candlestick
do it.
plotly.js/src/traces/ohlc/attributes.js
Lines 89 to 91 in 02e51d8
increasing: directionAttrs(INCREASING_COLOR), | |
decreasing: directionAttrs(DECREASING_COLOR), |
@archmoj can you point me the "real" waterfall mocks you added? I see that you remade all the Similarly, copying the entire |
Most of them start with |
- this was causing more issues than it solved.
- use (increasing|decreasing|totals).marker containers - use calcdata[i][j].dir (like ohlc/candlestick) to determine cont - 🔪 arraysToCalcdata, *.marker* attrs are editType:'style' - adapt Bar.plot and Bar textPointStyle for waterfall use - split out reusable Bar.hoverPoints logic for waterfall use - bring some Bar methods back to `master`
Update: branch master...waterfall_tests-tmp has the latest (most bug-free) version of waterfall. We're currently still testing a few things on that branch. We'll rebase those commits those tomorrow morning. |
@etpinard few more tests are added here: waterfall_tests-tmp...waterfall_more-tests |
- use a ohlc/candlestick approach to styling onSelect bypass [un]selected now that it is not supported in waterfall
- add logic to not show 'totals' part in legend item when waterfall trace does not show totals bars fixup bar / waterfall styles
…anning to few mocks - updated baselines
💃 💃 💃 Awesome work! |
Fixes #3037.
A prototype for
waterfall
new trace type mainly based onbar
.TODO:
offset
andwidth
working?total
color container an keepmarker
similar to barscliponaxis:false
supportcodepen