Top
You are looking at an outdated 7.3.0 version of this document. Switch to the 8.0.1 version to see the up to date information.

class anychart.charts.Scatter Improve this Doc

Extends: anychart.core.Chart

Scatter chart class.

Methods Overview

Miscellaneous
bubble()Adds Bubble series.
getSeries()Getter series by index.
grid()Getter for chart grid.
hatchFillPalette()Getter for hatch fill palette settings.
line()Adds Line series.
lineMarker()Getter for chart line marker.
marker()Adds Marker series.
markerPalette()Getter for markers palette settings.
minorGrid()Getter for chart minor grid.
palette()Getter for series colors palette.
rangeMarker()Getter for chart range marker.
textMarker()Getter for chart text marker.
xAxis()Getter for chart X-axis.
xScale()Getter for default chart X scale.
yAxis()Getter for chart Y-axis.
yScale()Getter for default chart Y scale.

Methods Description

bubble

Adds Bubble series.

Params:

Name Type Description
data anychart.data.View | anychart.data.Set | Array | string Data for the series.
csvSettings Object.<string, (string|boolean)> If CSV string is passed, you can pass CSV parser settings here as a hash map.

Try it:

getSeries

Getter series by index.

Params:

Name Type Description
index number

Try it:

grid

Getter for chart grid.

Params:

Name Type Description
index number Chart grid index. If not set - creates a new instance and adds it to the end of array.

Returns:

anychart.core.grids.Linear - Axis instance by index.

Try it:

Setter for chart grid.

Params:

Name Type Description
value Object | boolean | null Chart grid settings to set.

Returns:

anychart.scatter.Chart - anychart.scatter.Chart instance for method chaining.

Try it:

Setter for chart grid by index.

Params:

Name Type Description
index number Chart grid index.
value Object | boolean | null Chart grid settings to set.
Note: pass null or 'none' to disable the grid.

Returns:

anychart.scatter.Chart - anychart.scatter.Chart class for method chaining.

Try it:

hatchFillPalette

Getter for hatch fill palette settings.

Returns:

anychart.palettes.HatchFills - Current markers palette.
Setter for hatch fill palette settings.

Params:

Name Type Description
value Array.<anychart.graphics.vector.HatchFill.HatchFillType> | Object | anychart.palettes.HatchFills Chart hatch fill palette settings to set.

Returns:

anychart.charts.Scatter - anychart.charts.Scatter instance for method chaining.

Try it:

line

Adds Line series.

Params:

Name Type Description
data anychart.data.View | anychart.data.Set | Array | string Data for the series.
csvSettings Object.<string, (string|boolean)> If CSV string is passed, you can pass CSV parser settings here as a hash map.

Returns:

anychart.core.scatter.series.Base - anychart.core.scatter.series.Line instance for method chaining.

Try it:

lineMarker

Getter for chart line marker.

Params:

Name Type Description
index number Chart line marker index. If not set - creates a new instance and adds it to the end of array.

Returns:

anychart.core.axisMarkers.Line - Line marker instance by index.

Try it:

Setter for chart line marker.

Params:

Name Type Description
value Object | boolean | null Chart line marker settings to set.

Returns:

anychart.scatter.Chart - anychart.scatter.Chart instance for method chaining.

Try it:

Setter for chart line marker by index.

Params:

Name Type Description
index number Chart line marker index.
value Object | boolean | null Chart line marker settings to set.
Note: pass null or 'none' to disable marker.

Returns:

anychart.scatter.Chart - anychart.scatter.Chart instance for method chaining.

Try it:

marker

Adds Marker series.

Params:

Name Type Description
data anychart.data.View | anychart.data.Set | Array | string Data for the series.
csvSettings Object.<string, (string|boolean)> If CSV string is passed, you can pass CSV parser settings here as a hash map.

Try it:

markerPalette

Getter for markers palette settings.

Returns:

anychart.palettes.Markers - Current markers palette.
Setter for markers palette settings.

Params:

Name Type Description
value anychart.palettes.Markers | Object | Array.<anychart.enums.MarkerType> Value to set.

Returns:

anychart.scatter.Chart - anychart.scatter.Chart instance for method chaining.

Try it:

minorGrid

Getter for chart minor grid.

Params:

Name Type Description
index number Chart minor grid index. If not set - creates a new instance and adds it to the end of array.

Returns:

anychart.core.grids.Linear - Axis instance by index.

Try it:

Setter for chart minor grid.

Params:

Name Type Description
value Object | boolean | null Chart minor grid settings to set.

Returns:

anychart.scatter.Chart - anychart.scatter.Chart instance for method chaining.

Try it:

Setter for chart minor grid by index.

Params:

Name Type Description
index number Chart minor grid index.
value Object | boolean | null Chart minor grid settings to set.
Note: pass null or 'none' to disable the grid.

Returns:

anychart.scatter.Chart - anychart.scatter.Chart instance for method chaining.

Try it:

palette

Getter for series colors palette.
Setter for series colors palette.

Params:

Name Type Description
value anychart.palettes.RangeColors | anychart.palettes.DistinctColors | Object | Array.<string> Value to set.

Returns:

anychart.scatter.Chart - anychart.scatter.Chart instance for method chaining.

Try it:

rangeMarker

Getter for chart range marker.

Params:

Name Type Description
index number Chart range marker index. If not set - creates a new instance and adds it to the end of array.

Returns:

anychart.core.axisMarkers.Range - Range marker instance by index.

Try it:

Setter for chart range marker.

Params:

Name Type Description
value Object | boolean | null Chart range marker settings to set.

Returns:

anychart.scatter.Chart - anychart.scatter.Chart instance for method chaining.

Try it:

Setter for chart range marker by index.

Params:

Name Type Description
index number Chart range marker index.
value Object | boolean | null Chart range marker settings to set.
Note: pass null or 'none' to disable marker.

Returns:

anychart.scatter.Chart - anychart.scatter.Chart instance for method chaining.

Try it:

textMarker

Getter for chart text marker.

Params:

Name Type Description
index number Chart text marker index. If not set - creates a new instance and adds it to the end of array.

Returns:

anychart.core.axisMarkers.Text - text marker instance by index.

Try it:

Setter for chart text marker.

Params:

Name Type Description
value Object | boolean | null Chart text marker settings to set.

Returns:

anychart.scatter.Chart - anychart.scatter.Chart instance for method chaining.

Try it:

Setter for chart text marker by index.

Params:

Name Type Description
index number Chart text marker index.
value Object | boolean | null Chart text marker settings to set.
Note: pass null or 'none' to disable marker.

Returns:

anychart.scatter.Chart - anychart.scatter.Chart instance for method chaining.

Try it:

xAxis

Getter for chart X-axis.

Params:

Name Type Description
index number Chart axis index. If not set - creates a new instance and adds it to the end of array.

Returns:

anychart.core.axes.Linear - Axis instance by index.

Try it:

Setter for chart X-axis.

Params:

Name Type Description
value Object | boolean | null Chart axis settings to set.

Returns:

anychart.scatter.Chart - anychart.scatter.Chart instance for method chaining.

Try it:

Setter for chart X-axis by index.

Params:

Name Type Description
index number Chart axis index.
value Object | boolean | null Chart axis settings to set.

Returns:

anychart.scatter.Chart - anychart.scatter.Chart instance for method chaining.

Try it:

xScale

Getter for default chart X scale.

Returns:

anychart.scales.ScatterBase - Default chart scale value.

Try it:

Setter for default chart X scale.
Note: This scale will be passed to all scale dependent chart elements if they don't have their own scales.
Note: You can pass linear or logarithmic scales only.

Params:

Name Type Description
value anychart.enums.ScatterScaleTypes | anychart.scales.ScatterBase X Scale to set.

Returns:

anychart.scatter.Chart - anychart.scatter.Chart instance for method chaining.

Try it:

yAxis

Getter for chart Y-axis.

Params:

Name Type Description
index number Chart axis index. If not set - creates a new instance and adds it to the end of array.

Returns:

anychart.core.axes.Linear - Axis instance by index.

Try it:

Setter for chart Y-axis.

Params:

Name Type Description
value Object | boolean | null Chart axis settings to set.

Returns:

anychart.scatter.Chart - anychart.scatter.Chart instance for method chaining.

Try it:

Setter for chart Y-axis by index.

Params:

Name Type Description
index number Chart axis index.
value Object | boolean | null Chart axis settings to set.

Returns:

anychart.scatter.Chart - anychart.scatter.Chart instance for method chaining.

Try it:

yScale

Getter for default chart Y scale.

Returns:

anychart.scales.ScatterBase - Default chart scale value.

Try it:

Setter for default chart Y scale.
Note: This scale will be passed to all scale dependent chart elements if they don't have their own scales.
Note: You can pass linear or logarithmic scales only.

Params:

Name Type Description
value anychart.enums.ScatterScaleTypes | anychart.scales.ScatterBase Y Scale to set.

Returns:

anychart.scatter.Chart - anychart.scatter.Chart instance for method chaining.

Try it: