Plotly.js: Support for making multiple selections using Box selector or Lasso selector tools in Plotly.js

Created on 28 Jun 2016  路  10Comments  路  Source: plotly/plotly.js

Hi,
Is there any way to handle multiple selections simultaneously i.e. without cancelling the previous selection? Currently, when the Box select cursor is selected (from the modebar) and box selection is applied, the previously selected part of the graph gets deselected and the box re-appears for the newly selected part. I was just wondering if we can select new data points on the graph without deselecting the previous ones.

Any help will be appreciated.
Thanks!

feature

Most helpful comment

Awesome @dfcreative :tada:

We should also discuss what should happen to the plotly_selected event data during multiple selections.

I'd vote for emit a plotly_selected event after every selection stroke is completed and making the points array include points for all selected currently visible.

Thoughts?

All 10 comments

Is there any way to handle multiple selections simultaneously i.e. without cancelling the previous selection

Not at the moment.

This is a limitation of the current implementation. See PR https://github.com/plotly/plotly.js/pull/154 for more information.

That said, what you describe would be a great addition to the library.

This would be awesome!

A great thing to do would be to enable pressing shift+selection to add to the current selection (keeping selection without pressing the shift key working as-is).

I could really use this functionality as well. We use plotly for annotating various charts and many need multiple annotations.

cc @dfcreative @chriddyp @jackwluo

@dfcreative

@dfcreative

Here is work in progress:

screen

Things to do:

  • [x] merge polygons
  • [x] make proper shift interaction
  • [x] cover scattergl case
  • [x] add multibox selection
  • [ ] fix selection hover for scattergl
  • [ ] panning an axis resets selection
  • [x] enable box/lasso selection
  • [x] highlight selection before entering the selection mode

Awesome @dfcreative :tada:

We should also discuss what should happen to the plotly_selected event data during multiple selections.

I'd vote for emit a plotly_selected event after every selection stroke is completed and making the points array include points for all selected currently visible.

Thoughts?

Progress so far

multisel

Was this page helpful?
0 / 5 - 0 ratings

Related issues

deecay picture deecay  路  3Comments

maxwell8888 picture maxwell8888  路  3Comments

hashimmoosavi picture hashimmoosavi  路  3Comments

danielsamuels picture danielsamuels  路  3Comments

bryaan picture bryaan  路  3Comments