Repository navigation
boxplot points hover events #192
Description
Activity
Could you share an example of your code (codepen/jsbin/jsfiddle) where this isn't working for you? A graph div with a box plot will emit a
plotly_hoverevent that you can bind a function to like so:var graphDiv = document.getElementById('graph-div'); graphDiv.on('plotly_hover', function(data){ // do something with the emitted data here });
http://codepen.io/anon/pen/mVqQyY
When you hover any of the data points (not the box and whisker itself), I would like to show a tooltip corresponding to the text array.
@etpinard perhaps can chime in with more details on this.
@joshua-gould that'd be a nice feature. Thanks for the suggestion!
I suspect making this happen will be tricky. But it could be a good opportunity to split up
graph_interact.jsOne workaround is to create an additional scatter trace.
Recently I was seeking for the exact same feature.
If it were possible to have it the close future that would be very nice.
+1 for separate hover tool tips for the data points, my users would like to be able to hover the points for labels associated with the numerical data being plotted
I'd love this feature.
Select/lasso dragmodes are coming to box traces soon; it might be good to tackle this ticket too.
To get this done, I'm thinking about adding a
hoveronattribute to box trace (similar to scatter and scatterternary):// (default) this would correspond to the current behavior hoveron: 'boxes' // display hover labels for the visible boxpoints only // this would support multiple labels per box and per traces // for hovermode 'x' and 'y' hoveron: 'points' // both modes at the same time, // where 'boxes' would take precedence when cursor is over a box hoveron: 'points+boxes'
any thoughts on this @alexcjohnson @cldougl @chriddyp ?
Reacted by Geoffrey Fairchild, Salim B and Angelo Walsh👍 love this!
points+boxeswill be great,hoveronseems right to me.
I suppose thathovermodeoptions could apply here as well (think horizontally stacked box plots with points)Sounds great!
hoveronand its values sound perfect. Only question is about:'boxes' would take precedence when cursor is over a box
I'd probably have gone the other way, since the box is large and has a permissive hover region, give the points small hover regions (reuse the way scatter does it) but let them take precedence within that region.
Reacted by etpinardI have difficulties producing the implemented hover effect:
https://codepen.io/anon/pen/BwerzQWhat did I miss? I used the latest 1.32.1 version...
@dejanskledar #2094 hasn't been released yet.
See changelog here: https://github.com/plotly/plotly.js/releases
Oh, I misunderstood the 62 commits to master thinking that these commits are already included. Thanks.
@dejanskledar please ask questions of the likes on https://community.plot.ly/
Thanks.
Reacted by Dejan SkledarReacted by Dejan Skledar
It would be nice if hover events were fired for points rendered when drawing a boxplot