pyvista.Plotter.set_chart_interaction

pyvista.Plotter.set_chart_interaction#

Plotter.set_chart_interaction(interactive, toggle: bool = False)[source]#

Set or toggle interaction with charts for the active renderer.

Interaction with other charts in other renderers is disabled. Interaction with other charts in the active renderer is only disabled when toggle is False.

Parameters:
interactivebool | Chart | int | sequence[Chart] | sequence[int]

Following parameter values are accepted:

  • A boolean to enable (True) or disable (False) interaction with all charts in the active renderer.

  • The chart or its index to enable interaction with. Interaction with multiple charts can be enabled by passing a list of charts or indices.

togglebool, default: False

Instead of enabling interaction with the provided chart(s), interaction with the provided chart(s) is toggled. Only applicable when interactive is not a boolean.

Returns:
list of Chart

The list of all interactive charts for the active renderer.