-
-
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
Fix namelength=0 case + implement namelength to loneHover traces #3734
Conversation
Looks good me. Do you think namelength should (essentially) override < extra > ? |
I think namelength should do nothing if |
Hmm, I was going to argue the opposite - if you template some field into |
I think I prefer @alexcjohnson suggestion above. I think it's both useful and more consistent with our current behavior. All hover labels should be stylable in the same way whether they use @etpinard I just realized that the two functions |
Ha, good eye |
Well, the I don't have a strong preference. |
I regret using As for
|
use it to determine if we coerce `hoverinfo` and `hoverlabel` in Plots.supplyTraceDefaults
... during Plotly.PlotSchema.get()
... while making hoverlabel.namelength dflt to -1 when hovertemplate is set
... that is pie, sankey, sunburst and all gl3d traces
This PR is ready again for review.
Done in e9f8403
|
@@ -70,6 +71,7 @@ function render(scene) { | |||
if(lastPicked !== null) { | |||
var pdata = project(scene.glplot.cameraParams, selection.dataCoordinate); | |||
trace = lastPicked.data; | |||
var traceNow = gd._fullData[trace.index]; |
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.
@etpinard Could you please describe why traceNow
is needed here?
Thanks in advance.
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.
Because hoverlabel.*
edits don't (and shouldn't have to) replot the scene. As Plots.supplyDefaults
creates new gd._fullData
and gd._fullLayout
refs on every call, we need to use the right "now" trace object when hovering.
Thanks for all the tests! It looks good to me and I think it is ready to go. I will let @archmoj give you a dancer if he is satisfied with your answer. Absolutely non-blocking but could you set |
@etpinard thanks for the PR. |
fixes #3728
cc @plotly/plotly_js