✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Parallel coordinates plot axis line event?

I’m experimenting with using the Parallel coordinates plot and I have a lot of points on one of my axis. So labeling every single point doesn’t seem practical.

What i would like to do is be able to label just the points that are selected by the ‘pink bar’ on the axis. Does Plotly provide any sort of mechanism to do something like this?

We don’t provide a way to list the points inside a constraint (i.e. those pink bars), but you can grab the constraint values using:

var gd = document.getElementById('graph')
Plotly.newPlot(gd, [/* your parcoords trace */])

gd.on('plotly_restyle', () => {
  gd.data[0].dimensions.forEach(d => {
     d.constraintrange // => use this to find values are selected
  })
})
1 Like

This works great, but I notice that plotly_restyle is called once when the user has finished dragging the constraint. Is there a way to fire the event while the constraint is being moved as well?

Not at the moment, unfortunately.

Hi etienne,

Is there a way for me to fire an event with python on Jupyter notebook when a new constraint is set?