Usage
Signature
Parameters
altair.Chart
required
An Altair Chart object.
Literal['point'] | Literal['interval'] | bool
default:"True"
Selection type:
"point", "interval", or a bool. Defaults to True which will automatically detect the best selection type. This is ignored if the chart already has a point/interval selection param.list[str] | bool
default:"True"
List of legend fields (columns) for which to enable selection,
True to enable selection for all fields, or False to disable selection entirely. This is ignored if the chart already has a legend selection param.str
default:""
Markdown label for the element.
Optional[Callable[[ChartDataType], None]]
default:"None"
Optional callback to run when this element’s value changes.
Attributes
ChartDataType
A dataframe of the plot data filtered by the selections.
ChartDataType
A dataframe of the unfiltered chart data.
ChartSelection
The selection of the chart; this may be an interval along the name of an axis or a selection of points.
Methods
apply_selection
Apply the selection to a DataFrame. This method is useful when you have a layered chart and you want to apply the selection to a DataFrame.df(ChartDataType): A DataFrame to apply the selection to.