-
-
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
Funnel traces #3817
Funnel traces #3817
Conversation
.call(Color.fill, di.mc || cont.color) | ||
.call(Color.stroke, di.mlc || cont.line.color) | ||
.call(Drawing.dashLine, cont.line.dash, di.mlw || cont.line.width) | ||
.style('opacity', trace.selectedpoints && !di.selected ? 0.3 : 1); |
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.
For bonus points, as funnel
traces have (only) one marker
style container, it should be relatively easy to implement [un]selected.marker
styles like bar traces have:
plotly.js/src/traces/bar/attributes.js
Lines 199 to 216 in adf9bee
selected: { | |
marker: { | |
opacity: scatterAttrs.selected.marker.opacity, | |
color: scatterAttrs.selected.marker.color, | |
editType: 'style' | |
}, | |
textfont: scatterAttrs.selected.textfont, | |
editType: 'style' | |
}, | |
unselected: { | |
marker: { | |
opacity: scatterAttrs.unselected.marker.opacity, | |
color: scatterAttrs.unselected.marker.color, | |
editType: 'style' | |
}, | |
textfont: scatterAttrs.unselected.textfont, | |
editType: 'style' | |
}, |
Maybe you can come back to when funnelarea
is completed.
@@ -530,5 +519,32 @@ function calcTextinfo(calcTrace, index, xa, ya) { | |||
if(hasFlag('final')) text.push(formatNumber(final)); | |||
} | |||
|
|||
if(trace.type === 'funnel') { | |||
if(hasFlag('value')) text.push(formatNumber(cdi.s)); |
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.
Do we have a mock testing arrayOk
textinfo
settings?
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.
No we don't have any.
Should textinfo
be arrayOk
?
I think in pie
it is not. Anyway for the moment arrayOk
: false
is added here: 8d02bcf for better clarification.
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.
I can see value in having arrayOk:true
for textinfo
, but no need to do this in this PR.
…o coerce prefix and suffix for invisible axes - as required in funnel and waterfall textinfo
@archmoj you're almost there. Here's my list of blocking items:
|
…el textinfo attr on pie
…bar_attrs_relative to original
@etpinard Thanks for the review and checklist.
Good call. Done in 6d50386 so that the none of the current mocks change.
Done in d0e8fe5.
Done in fd1f6ca. |
@nicolaskruchten @alexcjohnson @etpinard plotly.js/src/traces/bar/plot.js Lines 536 to 580 in 6d50386
|
This PR is a triumph 🏆 Not only do we get a new trace type in (i.e.
@archmoj I know you still have a question about the 💃 💃 💃 💃 💃 💃 💃 |
Just to note a few things this PR didn't do:
|
👍 from me. |
@etpinard Thanks very much for the review and encouragement. |
This PR added 'bar-like'
funnel
traces on Cartesian coordinates towards addressing #3504.Also added
bar
andwaterfall
attributeinsidetextanchor
⚓bar
andwaterfall
attributetextangle
, supporting general [-180,180] angles 🚨waterfall
attributetextinfo
📝Basic codepen.
React codepen.
@plotly/plotly_js