Skip to content

Commit

Permalink
docs(typing): Update selection_point signature
Browse files Browse the repository at this point in the history
Follow-up to #3662

This PR simply aligns the changes introduced there to provide a consistent UX
  • Loading branch information
dangotbanned committed Oct 30, 2024
1 parent fef3488 commit 2a96c45
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions altair/vegalite/v5/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1616,11 +1616,11 @@ def selection_point(
value: Optional[_SelectionPointValue] = Undefined,
bind: Optional[Binding | str] = Undefined,
empty: Optional[bool] = Undefined,
expr: Optional[Expr] = Undefined,
encodings: Optional[list[SingleDefUnitChannel_T]] = Undefined,
fields: Optional[list[str]] = Undefined,
on: Optional[str] = Undefined,
clear: Optional[str | bool] = Undefined,
expr: Optional[str | Expr | Expression] = Undefined,
encodings: Optional[Sequence[SingleDefUnitChannel_T]] = Undefined,
fields: Optional[Sequence[str]] = Undefined,
on: Optional[str | MergedStreamKwds | DerivedStreamKwds] = Undefined,
clear: Optional[str | bool | MergedStreamKwds | DerivedStreamKwds] = Undefined,
resolve: Optional[SelectionResolution_T] = Undefined,
toggle: Optional[str | bool] = Undefined,
nearest: Optional[bool] = Undefined,
Expand All @@ -1631,36 +1631,36 @@ def selection_point(
Parameters
----------
name : string (optional)
name : str (optional)
The name of the parameter. If not specified, a unique name will be
created.
value : any (optional)
value : Any (optional)
The default value of the parameter. If not specified, the parameter
will be created without a default value.
bind : :class:`Binding`, str (optional)
Binds the parameter to an external input element such as a slider,
selection list or radio button group.
empty : boolean (optional)
empty : bool (optional)
For selection parameters, the predicate of empty selections returns
True by default. Override this behavior, by setting this property
'empty=False'.
expr : :class:`Expr` (optional)
An expression for the value of the parameter. This expression may
include other parameters, in which case the parameter will
automatically update in response to upstream parameter changes.
encodings : List[str] (optional)
encodings : Sequence[str] (optional)
A list of encoding channels. The corresponding data field values
must match for a data tuple to fall within the selection.
fields : List[str] (optional)
fields : Sequence[str] (optional)
A list of field names whose values must match for a data tuple to
fall within the selection.
on : string (optional)
on : str (optional)
A Vega event stream (object or selector) that triggers the selection.
For interval selections, the event stream must specify a start and end.
clear : string or boolean (optional)
clear : str, bool (optional)
Clears the selection, emptying it of all values. This property can
be an Event Stream or False to disable clear. Default is 'dblclick'.
resolve : enum('global', 'union', 'intersect') (optional)
resolve : Literal['global', 'union', 'intersect'] (optional)
With layered and multi-view displays, a strategy that determines
how selections' data queries are resolved when applied in a filter
transform, conditional encoding rule, or scale domain.
Expand All @@ -1676,7 +1676,7 @@ def selection_point(
brushes.
The default is 'global'.
toggle : string or boolean (optional)
toggle : str, bool (optional)
Controls whether data values should be toggled (inserted or
removed from a point selection) or only ever inserted into
point selections.
Expand All @@ -1696,13 +1696,13 @@ def selection_point(
value to the Vega expression True will toggle data values
without the user pressing the shift-key.
nearest : boolean (optional)
nearest : bool (optional)
When true, an invisible voronoi diagram is computed to accelerate
discrete selection. The data value nearest the mouse cursor is
added to the selection. The default is False, which means that
data values must be interacted with directly (e.g., clicked on)
to be added to the selection.
**kwds :
**kwds : Any
Additional keywords to control the selection.
Returns
Expand Down

0 comments on commit 2a96c45

Please sign in to comment.