Skip to content

boxplot points hover events #192

Description

@joshua-gould

It would be nice if hover events were fired for points rendered when drawing a boxplot

Activity

  1. mdtusz commented on Jan 19, 2016

    @mdtusz
    Contributor

    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_hover event 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
    });
  2. joshua-gould commented on Jan 19, 2016

    @joshua-gould
    Author

    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.

  3. mdtusz commented on Jan 19, 2016

    @mdtusz
    Contributor

    @etpinard perhaps can chime in with more details on this.

  4. etpinard commented on Jan 19, 2016

    @etpinard
    Contributor

    @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.js

  5. joshua-gould commented on Feb 10, 2016

    @joshua-gould
    Author

    One workaround is to create an additional scatter trace.

  6. ifll commented on Feb 14, 2017

    @ifll

    Recently I was seeking for the exact same feature.

    If it were possible to have it the close future that would be very nice.

  7. MikeRixWolfe commented on Aug 10, 2017

    @MikeRixWolfe

    +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

  8. gfairchild commented on Aug 24, 2017

    @gfairchild

    I'd love this feature.

  9. etpinard commented on Oct 13, 2017

    @etpinard
    Contributor

    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 hoveron attribute 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 ?

  10. chriddyp commented on Oct 13, 2017

    @chriddyp
    Member

    👍 love this! points+boxes will be great, hoveron seems right to me.
    I suppose that hovermode options could apply here as well (think horizontally stacked box plots with points)

  11. alexcjohnson commented on Oct 13, 2017

    @alexcjohnson
    Collaborator

    Sounds great! hoveron and 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.

  12. dejanskledar commented on Oct 23, 2017

    @dejanskledar

    I have difficulties producing the implemented hover effect:
    https://codepen.io/anon/pen/BwerzQ

    What did I miss? I used the latest 1.32.1 version...

  13. etpinard commented on Oct 23, 2017

    @etpinard
    Contributor

    @dejanskledar #2094 hasn't been released yet.

    See changelog here: https://github.com/plotly/plotly.js/releases

  14. dejanskledar commented on Oct 24, 2017

    @dejanskledar

    Oh, I misunderstood the 62 commits to master thinking that these commits are already included. Thanks.

  15. dejanskledar commented on Oct 24, 2017

    @dejanskledar

    @etpinard Is there any other way to get the latest lib with #2094 included before the official release?

  16. etpinard commented on Oct 24, 2017

    @etpinard
    Contributor

    @dejanskledar please ask questions of the likes on https://community.plot.ly/

    Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions