scatter
Method of Figure.
Overloads
| Name | Description |
|---|---|
scatter(const Object points, const Map options) -> Figure | Adds a scatter series from point data. |
scatter(const Object points) -> Figure | Adds a scatter series from point data. |
scatter(const Map options) -> Figure | Adds a scatter series defined by options only. |
scatter(const Object x, const Object y) -> Figure | Adds a scatter series from x/y pairs. |
scatter(const Object x, const Object y, const Map options) -> Figure | Adds a scatter series from x/y pairs. |
scatter(const Object points, const Map options) -> Figure
Adds a scatter series from point data.
Parameters
- points: List or array of points, typically [x,y] or [x,y,value].
- options: Series option map merged into the series.
- id (string): Component ID.
- name (string): Series name for legend and tooltip.
- color_by (string): Color mapping: 'series' or 'data'.
- coordinate_system (string): Coordinate system: cartesian2d/polar/geo/singleAxis/calendar/matrix.
- coordinate_system_usage (string): Layout usage: 'data'.
- coord (List|number|string): Coord input for coordinate system (when usage is 'box').
- x_axis_index (number): xAxis index.
- x_axis_id (number): xAxis id.
- y_axis_index (number): yAxis index.
- y_axis_id (number): yAxis id.
- polar_index (number): Polar index.
- polar_id (number): Polar id.
- single_axis_index (number): singleAxis index.
- single_axis_id (number): singleAxis id.
- geo_index (number): Geo index.
- geo_id (number): Geo id.
- calendar_index (number): Calendar index.
- calendar_id (number): Calendar id.
- matrix_index (number): Matrix index.
- matrix_id (number): Matrix id.
- legend_hover_link (boolean): Highlight series on legend hover.
- symbol (string): Symbol type or callback.
- symbol_size (number|List): Symbol size.
- symbol_rotate (number): Symbol rotation.
- symbol_keep_aspect (boolean): Keep aspect for path symbols.
- symbol_offset (List): Symbol offset.
- large (boolean): Enable large data optimization.
- large_threshold (number): Large data threshold.
- cursor (string): Mouse cursor when hovering.
- label (Map): Label options.
- label.show (boolean): Show label.
- label.position (string|List): Label position.
- label.distance (number): Label distance to symbol.
- label.rotate (number): Label rotation.
- label.offset (List): Label offset.
- label.text_margin (number|List): Label margin around text.
- label.min_margin (number): Minimum margin between labels.
- label.formatter (string): Label formatter.
- label.color (Color): Label color.
- label.font_style (string): Label font style.
- label.font_weight (string|number): Label font weight.
- label.font_family (string): Label font family.
- label.font_size (number): Label font size.
- label.align (string): Label horizontal alignment.
- label.vertical_align (string): Label vertical alignment.
- label.line_height (number): Label line height.
- label.background_color (string|Map): Label background.
- label.border_color (Color): Label border color.
- label.border_width (number): Label border width.
- label.border_type (string|number|List): Label border type.
- label.border_dash_offset (number): Label border dash offset.
- label.border_radius (number): Label border radius.
- label.padding (number|List): Label padding.
- label.shadow_color (Color): Label shadow color.
- label.shadow_blur (number): Label shadow blur.
- label.shadow_offset_x (number): Label shadow offset X.
- label.shadow_offset_y (number): Label shadow offset Y.
- label.width (number): Label width.
- label.height (number): Label height.
- label.text_border_color (Color): Label text stroke color.
- label.text_border_width (number): Label text stroke width.
- label.text_border_type (string|number|List): Label text stroke type.
- label.text_border_dash_offset (number): Label text stroke dash offset.
- label.text_shadow_color (Color): Label text shadow color.
- label.text_shadow_blur (number): Label text shadow blur.
- label.text_shadow_offset_x (number): Label text shadow offset X.
- label.text_shadow_offset_y (number): Label text shadow offset Y.
- label.overflow (string): Label overflow handling.
- label.ellipsis (string): Label ellipsis.
- label.rich (Map): Label rich text styles.
- label.rich_inherit_plain_label (boolean): Rich text inherits plain styles.
- label_line (Map): Label guide line options.
- label_line.show (boolean): Show label line.
- label_line.show_above (boolean): Show label line above element.
- label_line.length2 (number): Second segment length.
- label_line.smooth (boolean|number): Smooth label line.
- label_line.min_turn_angle (number): Minimum turn angle.
- label_line.line_style (Map): Label line style.
- label_layout (Map): Label layout options.
- label_layout.hide_overlap (boolean): Hide overlapped labels.
- label_layout.move_overlap (string): Move overlapped labels.
- label_layout.x (number|string): Label x position.
- label_layout.y (number|string): Label y position.
- label_layout.dx (number): Label x offset.
- label_layout.dy (number): Label y offset.
- label_layout.rotate (number): Label rotation.
- label_layout.width (number): Label width.
- label_layout.height (number): Label height.
- label_layout.align (string): Label horizontal alignment.
- label_layout.vertical_align (string): Label vertical alignment.
- label_layout.font_size (number): Label font size.
- label_layout.draggable (boolean): Allow dragging labels.
- label_layout.label_line_points (List): Label line points.
- item_style (Map): Item style options.
- item_style.color (Color): Item color.
- item_style.border_color (Color): Item border color.
- item_style.border_width (number): Item border width.
- item_style.border_type (string|number|List): Item border type.
- item_style.border_dash_offset (number): Item border dash offset.
- item_style.border_cap (string): Item border cap.
- item_style.border_join (string): Item border join.
- item_style.border_miter_limit (number): Item border miter limit.
- item_style.shadow_blur (number): Item shadow blur.
- item_style.shadow_color (Color): Item shadow color.
- item_style.shadow_offset_x (number): Item shadow offset X.
- item_style.shadow_offset_y (number): Item shadow offset Y.
- item_style.opacity (number): Item opacity.
- emphasis.disabled (boolean): Disable emphasis state.
- emphasis.scale (boolean|number): Scale on emphasis.
- emphasis.focus (string): Focus mode: none/self/series.
- emphasis.blur_scope (string): Blur scope: coordinateSystem/series/global.
- emphasis (Map): Emphasis state options.
- emphasis.label (Map): Emphasis label options.
- emphasis.label_line (Map): Emphasis label line options.
- emphasis.item_style (Map): Emphasis item style options.
- blur (Map): Blur state options.
- blur.label (Map): Blur label options.
- blur.label_line (Map): Blur label line options.
- blur.item_style (Map): Blur item style options.
- select (Map): Select state options.
- select.label (Map): Select label options.
- select.label_line (Map): Select label line options.
- select.item_style (Map): Select item style options.
- select.disabled (boolean): Disable selection.
- selected_mode (boolean|string): Selection mode: true/false/'single'/'multiple'/'series'.
- progressive (number): Progressive rendering amount.
- progressive_threshold (number): Progressive rendering threshold.
- dimensions (List): Dimensions definition.
- encode (Map): Encode mapping.
- series_layout_by (string): Dataset layout: 'column' or 'row'.
- dataset_index (number): Dataset index to use.
- data_group_id (string): Group ID for data items.
- data (List): Series data.
- mark_point (Map): Mark point options.
- mark_line (Map): Mark line options.
- mark_area (Map): Mark area options.
- clip (boolean): Clip overflow on coordinate system.
- zlevel (number): Canvas layer.
- z (number): Z order.
- silent (boolean): Ignore mouse events.
- animation (boolean): Enable animation.
- animation_threshold (number): Animation threshold.
- animation_duration (number): Initial animation duration.
- animation_easing (string): Initial animation easing.
- animation_delay (number): Initial animation delay.
- animation_duration_update (number): Update animation duration.
- animation_easing_update (string): Update animation easing.
- animation_delay_update (number): Update animation delay.
- universal_transition (Map|boolean): Universal transition options.
- universal_transition.enabled (boolean): Enable universal transition.
- universal_transition.series_key (string|List): Series key(s) for transition.
- universal_transition.divide_shape (string): Split strategy: split/clone.
- tooltip (Map): Series tooltip options.
scatter(const Object points) -> Figure
Adds a scatter series from point data.
Parameters
- points: List or array of points, typically [x,y] or [x,y,value].
scatter(const Map options) -> Figure
Adds a scatter series defined by options only.
Parameters
- options: Series option map, commonly used with dataset/encode.
- id (string): Component ID.
- name (string): Series name for legend and tooltip.
- color_by (string): Color mapping: 'series' or 'data'.
- coordinate_system (string): Coordinate system: cartesian2d/polar/geo/singleAxis/calendar/matrix.
- coordinate_system_usage (string): Layout usage: 'data'.
- coord (List|number|string): Coord input for coordinate system (when usage is 'box').
- x_axis_index (number): xAxis index.
- x_axis_id (number): xAxis id.
- y_axis_index (number): yAxis index.
- y_axis_id (number): yAxis id.
- polar_index (number): Polar index.
- polar_id (number): Polar id.
- single_axis_index (number): singleAxis index.
- single_axis_id (number): singleAxis id.
- geo_index (number): Geo index.
- geo_id (number): Geo id.
- calendar_index (number): Calendar index.
- calendar_id (number): Calendar id.
- matrix_index (number): Matrix index.
- matrix_id (number): Matrix id.
- legend_hover_link (boolean): Highlight series on legend hover.
- symbol (string): Symbol type or callback.
- symbol_size (number|List): Symbol size.
- symbol_rotate (number): Symbol rotation.
- symbol_keep_aspect (boolean): Keep aspect for path symbols.
- symbol_offset (List): Symbol offset.
- large (boolean): Enable large data optimization.
- large_threshold (number): Large data threshold.
- cursor (string): Mouse cursor when hovering.
- label (Map): Label options.
- label.show (boolean): Show label.
- label.position (string|List): Label position.
- label.distance (number): Label distance to symbol.
- label.rotate (number): Label rotation.
- label.offset (List): Label offset.
- label.text_margin (number|List): Label margin around text.
- label.min_margin (number): Minimum margin between labels.
- label.formatter (string): Label formatter.
- label.color (Color): Label color.
- label.font_style (string): Label font style.
- label.font_weight (string|number): Label font weight.
- label.font_family (string): Label font family.
- label.font_size (number): Label font size.
- label.align (string): Label horizontal alignment.
- label.vertical_align (string): Label vertical alignment.
- label.line_height (number): Label line height.
- label.background_color (string|Map): Label background.
- label.border_color (Color): Label border color.
- label.border_width (number): Label border width.
- label.border_type (string|number|List): Label border type.
- label.border_dash_offset (number): Label border dash offset.
- label.border_radius (number): Label border radius.
- label.padding (number|List): Label padding.
- label.shadow_color (Color): Label shadow color.
- label.shadow_blur (number): Label shadow blur.
- label.shadow_offset_x (number): Label shadow offset X.
- label.shadow_offset_y (number): Label shadow offset Y.
- label.width (number): Label width.
- label.height (number): Label height.
- label.text_border_color (Color): Label text stroke color.
- label.text_border_width (number): Label text stroke width.
- label.text_border_type (string|number|List): Label text stroke type.
- label.text_border_dash_offset (number): Label text stroke dash offset.
- label.text_shadow_color (Color): Label text shadow color.
- label.text_shadow_blur (number): Label text shadow blur.
- label.text_shadow_offset_x (number): Label text shadow offset X.
- label.text_shadow_offset_y (number): Label text shadow offset Y.
- label.overflow (string): Label overflow handling.
- label.ellipsis (string): Label ellipsis.
- label.rich (Map): Label rich text styles.
- label.rich_inherit_plain_label (boolean): Rich text inherits plain styles.
- label_line (Map): Label guide line options.
- label_line.show (boolean): Show label line.
- label_line.show_above (boolean): Show label line above element.
- label_line.length2 (number): Second segment length.
- label_line.smooth (boolean|number): Smooth label line.
- label_line.min_turn_angle (number): Minimum turn angle.
- label_line.line_style (Map): Label line style.
- label_layout (Map): Label layout options.
- label_layout.hide_overlap (boolean): Hide overlapped labels.
- label_layout.move_overlap (string): Move overlapped labels.
- label_layout.x (number|string): Label x position.
- label_layout.y (number|string): Label y position.
- label_layout.dx (number): Label x offset.
- label_layout.dy (number): Label y offset.
- label_layout.rotate (number): Label rotation.
- label_layout.width (number): Label width.
- label_layout.height (number): Label height.
- label_layout.align (string): Label horizontal alignment.
- label_layout.vertical_align (string): Label vertical alignment.
- label_layout.font_size (number): Label font size.
- label_layout.draggable (boolean): Allow dragging labels.
- label_layout.label_line_points (List): Label line points.
- item_style (Map): Item style options.
- item_style.color (Color): Item color.
- item_style.border_color (Color): Item border color.
- item_style.border_width (number): Item border width.
- item_style.border_type (string|number|List): Item border type.
- item_style.border_dash_offset (number): Item border dash offset.
- item_style.border_cap (string): Item border cap.
- item_style.border_join (string): Item border join.
- item_style.border_miter_limit (number): Item border miter limit.
- item_style.shadow_blur (number): Item shadow blur.
- item_style.shadow_color (Color): Item shadow color.
- item_style.shadow_offset_x (number): Item shadow offset X.
- item_style.shadow_offset_y (number): Item shadow offset Y.
- item_style.opacity (number): Item opacity.
- emphasis.disabled (boolean): Disable emphasis state.
- emphasis.scale (boolean|number): Scale on emphasis.
- emphasis.focus (string): Focus mode: none/self/series.
- emphasis.blur_scope (string): Blur scope: coordinateSystem/series/global.
- emphasis (Map): Emphasis state options.
- emphasis.label (Map): Emphasis label options.
- emphasis.label_line (Map): Emphasis label line options.
- emphasis.item_style (Map): Emphasis item style options.
- blur (Map): Blur state options.
- blur.label (Map): Blur label options.
- blur.label_line (Map): Blur label line options.
- blur.item_style (Map): Blur item style options.
- select (Map): Select state options.
- select.label (Map): Select label options.
- select.label_line (Map): Select label line options.
- select.item_style (Map): Select item style options.
- select.disabled (boolean): Disable selection.
- selected_mode (boolean|string): Selection mode: true/false/'single'/'multiple'/'series'.
- progressive (number): Progressive rendering amount.
- progressive_threshold (number): Progressive rendering threshold.
- dimensions (List): Dimensions definition.
- encode (Map): Encode mapping.
- series_layout_by (string): Dataset layout: 'column' or 'row'.
- dataset_index (number): Dataset index to use.
- data_group_id (string): Group ID for data items.
- data (List): Series data.
- mark_point (Map): Mark point options.
- mark_line (Map): Mark line options.
- mark_area (Map): Mark area options.
- clip (boolean): Clip overflow on coordinate system.
- zlevel (number): Canvas layer.
- z (number): Z order.
- silent (boolean): Ignore mouse events.
- animation (boolean): Enable animation.
- animation_threshold (number): Animation threshold.
- animation_duration (number): Initial animation duration.
- animation_easing (string): Initial animation easing.
- animation_delay (number): Initial animation delay.
- animation_duration_update (number): Update animation duration.
- animation_easing_update (string): Update animation easing.
- animation_delay_update (number): Update animation delay.
- universal_transition (Map|boolean): Universal transition options.
- universal_transition.enabled (boolean): Enable universal transition.
- universal_transition.series_key (string|List): Series key(s) for transition.
- universal_transition.divide_shape (string): Split strategy: split/clone.
- tooltip (Map): Series tooltip options.
scatter(const Object x, const Object y) -> Figure
Adds a scatter series from x/y pairs.
Parameters
scatter(const Object x, const Object y, const Map options) -> Figure
Adds a scatter series from x/y pairs.
Parameters
- x: List, array, or range of x values.
- y: List, array, or range of y values.
- options: Series option map merged into the series.
- id (string): Component ID.
- name (string): Series name for legend and tooltip.
- color_by (string): Color mapping: 'series' or 'data'.
- coordinate_system (string): Coordinate system: cartesian2d/polar/geo/singleAxis/calendar/matrix.
- coordinate_system_usage (string): Layout usage: 'data'.
- coord (List|number|string): Coord input for coordinate system (when usage is 'box').
- x_axis_index (number): xAxis index.
- x_axis_id (number): xAxis id.
- y_axis_index (number): yAxis index.
- y_axis_id (number): yAxis id.
- polar_index (number): Polar index.
- polar_id (number): Polar id.
- single_axis_index (number): singleAxis index.
- single_axis_id (number): singleAxis id.
- geo_index (number): Geo index.
- geo_id (number): Geo id.
- calendar_index (number): Calendar index.
- calendar_id (number): Calendar id.
- matrix_index (number): Matrix index.
- matrix_id (number): Matrix id.
- legend_hover_link (boolean): Highlight series on legend hover.
- symbol (string): Symbol type or callback.
- symbol_size (number|List): Symbol size.
- symbol_rotate (number): Symbol rotation.
- symbol_keep_aspect (boolean): Keep aspect for path symbols.
- symbol_offset (List): Symbol offset.
- large (boolean): Enable large data optimization.
- large_threshold (number): Large data threshold.
- cursor (string): Mouse cursor when hovering.
- label (Map): Label options.
- label.show (boolean): Show label.
- label.position (string|List): Label position.
- label.distance (number): Label distance to symbol.
- label.rotate (number): Label rotation.
- label.offset (List): Label offset.
- label.text_margin (number|List): Label margin around text.
- label.min_margin (number): Minimum margin between labels.
- label.formatter (string): Label formatter.
- label.color (Color): Label color.
- label.font_style (string): Label font style.
- label.font_weight (string|number): Label font weight.
- label.font_family (string): Label font family.
- label.font_size (number): Label font size.
- label.align (string): Label horizontal alignment.
- label.vertical_align (string): Label vertical alignment.
- label.line_height (number): Label line height.
- label.background_color (string|Map): Label background.
- label.border_color (Color): Label border color.
- label.border_width (number): Label border width.
- label.border_type (string|number|List): Label border type.
- label.border_dash_offset (number): Label border dash offset.
- label.border_radius (number): Label border radius.
- label.padding (number|List): Label padding.
- label.shadow_color (Color): Label shadow color.
- label.shadow_blur (number): Label shadow blur.
- label.shadow_offset_x (number): Label shadow offset X.
- label.shadow_offset_y (number): Label shadow offset Y.
- label.width (number): Label width.
- label.height (number): Label height.
- label.text_border_color (Color): Label text stroke color.
- label.text_border_width (number): Label text stroke width.
- label.text_border_type (string|number|List): Label text stroke type.
- label.text_border_dash_offset (number): Label text stroke dash offset.
- label.text_shadow_color (Color): Label text shadow color.
- label.text_shadow_blur (number): Label text shadow blur.
- label.text_shadow_offset_x (number): Label text shadow offset X.
- label.text_shadow_offset_y (number): Label text shadow offset Y.
- label.overflow (string): Label overflow handling.
- label.ellipsis (string): Label ellipsis.
- label.rich (Map): Label rich text styles.
- label.rich_inherit_plain_label (boolean): Rich text inherits plain styles.
- label_line (Map): Label guide line options.
- label_line.show (boolean): Show label line.
- label_line.show_above (boolean): Show label line above element.
- label_line.length2 (number): Second segment length.
- label_line.smooth (boolean|number): Smooth label line.
- label_line.min_turn_angle (number): Minimum turn angle.
- label_line.line_style (Map): Label line style.
- label_layout (Map): Label layout options.
- label_layout.hide_overlap (boolean): Hide overlapped labels.
- label_layout.move_overlap (string): Move overlapped labels.
- label_layout.x (number|string): Label x position.
- label_layout.y (number|string): Label y position.
- label_layout.dx (number): Label x offset.
- label_layout.dy (number): Label y offset.
- label_layout.rotate (number): Label rotation.
- label_layout.width (number): Label width.
- label_layout.height (number): Label height.
- label_layout.align (string): Label horizontal alignment.
- label_layout.vertical_align (string): Label vertical alignment.
- label_layout.font_size (number): Label font size.
- label_layout.draggable (boolean): Allow dragging labels.
- label_layout.label_line_points (List): Label line points.
- item_style (Map): Item style options.
- item_style.color (Color): Item color.
- item_style.border_color (Color): Item border color.
- item_style.border_width (number): Item border width.
- item_style.border_type (string|number|List): Item border type.
- item_style.border_dash_offset (number): Item border dash offset.
- item_style.border_cap (string): Item border cap.
- item_style.border_join (string): Item border join.
- item_style.border_miter_limit (number): Item border miter limit.
- item_style.shadow_blur (number): Item shadow blur.
- item_style.shadow_color (Color): Item shadow color.
- item_style.shadow_offset_x (number): Item shadow offset X.
- item_style.shadow_offset_y (number): Item shadow offset Y.
- item_style.opacity (number): Item opacity.
- emphasis.disabled (boolean): Disable emphasis state.
- emphasis.scale (boolean|number): Scale on emphasis.
- emphasis.focus (string): Focus mode: none/self/series.
- emphasis.blur_scope (string): Blur scope: coordinateSystem/series/global.
- emphasis (Map): Emphasis state options.
- emphasis.label (Map): Emphasis label options.
- emphasis.label_line (Map): Emphasis label line options.
- emphasis.item_style (Map): Emphasis item style options.
- blur (Map): Blur state options.
- blur.label (Map): Blur label options.
- blur.label_line (Map): Blur label line options.
- blur.item_style (Map): Blur item style options.
- select (Map): Select state options.
- select.label (Map): Select label options.
- select.label_line (Map): Select label line options.
- select.item_style (Map): Select item style options.
- select.disabled (boolean): Disable selection.
- selected_mode (boolean|string): Selection mode: true/false/'single'/'multiple'/'series'.
- progressive (number): Progressive rendering amount.
- progressive_threshold (number): Progressive rendering threshold.
- dimensions (List): Dimensions definition.
- encode (Map): Encode mapping.
- series_layout_by (string): Dataset layout: 'column' or 'row'.
- dataset_index (number): Dataset index to use.
- data_group_id (string): Group ID for data items.
- data (List): Series data.
- mark_point (Map): Mark point options.
- mark_line (Map): Mark line options.
- mark_area (Map): Mark area options.
- clip (boolean): Clip overflow on coordinate system.
- zlevel (number): Canvas layer.
- z (number): Z order.
- silent (boolean): Ignore mouse events.
- animation (boolean): Enable animation.
- animation_threshold (number): Animation threshold.
- animation_duration (number): Initial animation duration.
- animation_easing (string): Initial animation easing.
- animation_delay (number): Initial animation delay.
- animation_duration_update (number): Update animation duration.
- animation_easing_update (string): Update animation easing.
- animation_delay_update (number): Update animation delay.
- universal_transition (Map|boolean): Universal transition options.
- universal_transition.enabled (boolean): Enable universal transition.
- universal_transition.series_key (string|List): Series key(s) for transition.
- universal_transition.divide_shape (string): Split strategy: split/clone.
- tooltip (Map): Series tooltip options.