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

class anychart.charts.Scatter Improve this Doc

Extends: anychart.core.SeparateChart

Scatter chart class.

Methods Overview

Miscellaneous
bubble()Adds Bubble series.
crosshair()Getter for the current crosshair settings.
getSeries()Getter series by index.
getType()Returns chart type.
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.
maxBubbleSize()Getter for the current maximum size for all bubbles on the charts.
minBubbleSize()Getter for the current minimum size for all bubbles on the charts.
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.

Returns:

anychart.core.scatter.series.Bubble - An instance of class for method chaining.

Try it:

crosshair

Getter for the current crosshair settings.

Returns:

anychart.core.ui.Crosshair - The current crosshair settings.

Try it:

Setter for the crosshair settings.

Params:

Name Type Description
value Object | boolean | null Crosshair settings.

Returns:

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

getSeries

Getter series by index.

Params:

Name Type Description
index number Gets series by index.

Returns:

anychart.core.scatter.series.Base - An instance of class for method chaining.

Try it:

getType

Returns chart type.

Returns:

anychart.enums.ChartTypes - Current chart type.

Try it:

grid

Getter for chart grid.

Params:

Name Type Default Description
index number
0
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 Default Description
value Object | boolean | null
true
Chart grid settings to set.

Returns:

anychart.charts.Scatter - Self instance for method chaining.
Setter for chart grid by index.

Params:

Name Type Default Description
index number
0
Chart grid index.
value Object | boolean | null
Chart grid settings to set.

Returns:

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

hatchFillPalette

Getter for hatch fill palette settings.

Returns:

anychart.palettes.HatchFills - Current markers palette.

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 - Self 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.Line - An instance of class for method chaining.

Try it:

lineMarker

Getter for chart line marker.

Params:

Name Type Default Description
index number
0
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 Default Description
value Object | boolean | null
false
Chart line marker settings to set.

Returns:

anychart.charts.Scatter - Self instance for method chaining.
Setter for chart line marker by index.

Params:

Name Type Default Description
index number
0
Chart line marker index.
value Object | boolean | null
Chart line marker settings to set.

Returns:

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

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.

Returns:

anychart.core.scatter.series.Marker - An instance of class for method chaining.

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.charts.Scatter - Self instance for method chaining.

Try it:

maxBubbleSize

Getter for the current maximum size for all bubbles on the charts.

Returns:

number string - The current maximum size of the all bubbles.

Try it:

Setter for the maximum size for all bubbles on the charts.

Params:

Name Type Default Description
value number | string
"20%"
Maximum size to set.

Returns:

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

Try it:

minBubbleSize

Getter for the current minimum size for all bubbles on the charts.

Returns:

number string - The current minimum size of the all bubbles.

Try it:

Setter for the minimum size for all bubbles on the charts.

Params:

Name Type Default Description
value number | string
"5%"
Minimum size to set.

Returns:

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

Try it:

minorGrid

Getter for chart minor grid.

Params:

Name Type Default Description
index number
0
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 Default Description
value Object | boolean | null
true
Chart minor grid settings to set.

Returns:

anychart.charts.Scatter - Self instance for method chaining.
Setter for chart minor grid by index.

Params:

Name Type Default Description
index number
0
Chart minor grid index.
value Object | boolean | null
Chart minor grid settings to set.

Returns:

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

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.charts.Scatter - Self instance for method chaining.

Try it:

rangeMarker

Getter for chart range marker.

Params:

Name Type Default Description
index number
0
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 Default Description
value Object | boolean | null
false
Chart range marker settings to set.

Returns:

anychart.charts.Scatter - Self instance for method chaining.
Setter for chart range marker by index.

Params:

Name Type Default Description
index number
0
Chart range marker index.
value Object | boolean | null
Chart range marker settings to set.

Returns:

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

textMarker

Getter for chart text marker.

Params:

Name Type Default Description
index number
0
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 Default Description
value Object | boolean | null
false
Chart text marker settings to set.

Returns:

anychart.charts.Scatter - Self instance for method chaining.
Setter for chart text marker by index.

Params:

Name Type Default Description
index number
0
Chart text marker index.
value Object | boolean | null
Chart text marker settings to set.

Returns:

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

xAxis

Getter for chart X-axis.

Params:

Name Type Default Description
index number
0
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 Default Description
value Object | boolean | null
true
Chart axis settings to set.

Returns:

anychart.charts.Scatter - Self instance for method chaining.
Setter for chart X-axis by index.

Params:

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

Returns:

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

xScale

Getter for default chart X scale.

Returns:

anychart.scales.ScatterBase - Default chart scale value.

Try it:

Setter for default chart X scale.

Params:

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

Returns:

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

Try it:

yAxis

Getter for chart Y-axis.

Params:

Name Type Default Description
index number
0
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 Default Description
value Object | boolean | null
true
Chart axis settings to set.

Returns:

anychart.charts.Scatter - Self instance for method chaining.
Setter for chart Y-axis by index.

Params:

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

Returns:

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

yScale

Getter for default chart Y scale.

Returns:

anychart.scales.ScatterBase - Default chart scale value.

Try it:

Setter for default chart Y scale.

Params:

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

Returns:

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

Try it: