You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement hoveron: 'fills' for scattergl and scatterpolargl #2887
During a discussion in the plotly.py forums in came up that the hoverlabel for the scatterpolar trace has a different behavior when the fill state is set to toself than when it's set to none.
It also seems that the hoverinfo propery has no effect when fill is toself.
I did the same comparison with the scatterpolargl trace and it has the behavior that I expected:
fill: 'toself; for scatterpolargl
I don't know if this is a bug in scatterpolar or scatterpolargl, but I find the current scatterpolargl behavior (The behavior consistent with fill of none) to be more helpful.
This is the hoveron attribute, which defaults to fills in this case. This is consistent with scatter behavior, scatterpolargl seems to be the odd one out.
@alexcjohnson is right scatterpolargl is the odd one out. I didn't know fills in scatterpolargl were a thing. That's what you get from reusing polar + scattergl logic I guess. But I doubt they function properly yet along have the correct hoverinfo.
Looking at this more closely, the real problem is with scattergl.
As listed in the old gl2d limitations ticket, hoveron: 'fills' never got implemented for scattergl. As scatterpolargl reuses most of the scattergl hover logic, once we implement hoveron: 'fills' for scattergl, it should just workTM for scatterpolargl.
So I guess this is another case of erroneously listed attributes. I'll make a PR 🔪 hoveron for scattergl and scatterpolargl.
@jonmmease Ok if I change the issue title to Implement hoveron: 'fills' for scattergl and scatterpolargl?
changed the title [-]Scatterpolar hoverinfo inconsistent in 'toself' fill state[/-][+]Implement `hoveron: 'fills'` for scattergl and scatterpolargl[/+]on Aug 9, 2018
// never let a 2D override 1D type as closest point
// also: no spikeDistance, it's not allowed for fills
distance: pointData.maxHoverDistance,
x0: xmin,
x1: xmax,
y0: yAvg,
y1: yAvg,
color: color,
hovertemplate: false
});
deletepointData.index;
if(trace.text&&!Array.isArray(trace.text)){
pointData.text=String(trace.text);
}elsepointData.text=trace.name;
return[pointData];
}
}
We'd need to implement similar logic in scattergl/hover - then since scatterpolargl/hover reuses scattergl/hover it might just work in scatterpolargl, or we might need a little more there.
Activity
alexcjohnson commentedon Aug 9, 2018
This is the
hoveronattribute, which defaults tofillsin this case. This is consistent withscatterbehavior,scatterpolarglseems to be the odd one out.etpinard commentedon Aug 9, 2018
@alexcjohnson is right
scatterpolarglis the odd one out. I didn't know fills inscatterpolarglwere a thing. That's what you get from reusing polar + scattergl logic I guess. But I doubt they function properly yet along have the correct hoverinfo.etpinard commentedon Aug 9, 2018
Looking at this more closely, the real problem is with
scattergl.As listed in the old gl2d limitations ticket,
hoveron: 'fills'never got implemented forscattergl. Asscatterpolarglreuses most of thescatterglhover logic, once we implementhoveron: 'fills'forscattergl, it should just workTM forscatterpolargl.So I guess this is another case of erroneously listed attributes. I'll make a PR 🔪
hoveronforscatterglandscatterpolargl.@jonmmease Ok if I change the issue title to Implement
hoveron: 'fills'for scattergl and scatterpolargl?jonmmease commentedon Aug 9, 2018
Sure!
[-]Scatterpolar hoverinfo inconsistent in 'toself' fill state[/-][+]Implement `hoveron: 'fills'` for scattergl and scatterpolargl[/+]🔪 hoveron declaration in scattergl and scatterpolargl
mgsnuno commentedon Mar 29, 2019
Hi. Will
hoveronbe implemented in scattergl?erezinman commentedon Jan 18, 2021
@etpinard
Hi, was this issue neglected/forgotten about?
Thanks!
nicolaskruchten commentedon Jan 19, 2021
This item isn't on anyone's roadmap that I know of at the moment, but we'd welcome a pull request to address it!
erezinman commentedon Jan 19, 2021
If you could point me towards where to look, I might do it.
alexcjohnson commentedon Jan 19, 2021
Here's
hoveron: fillsforscatter:plotly.js/src/traces/scatter/hover.js
Lines 107 to 192 in 373d4ff
We'd need to implement similar logic in
scattergl/hover- then sincescatterpolargl/hoverreusesscattergl/hoverit might just work in scatterpolargl, or we might need a little more there.danielsnider-aws commentedon Jan 25, 2024
+1 for implementing
hoveron: 'fills'for scattergl!