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

class anychart.core.polar.series.Base Improve this Doc

Extends: anychart.core.VisualBaseWithBounds

Base class for all polar series.
Base class defines common methods, such as those for:

  • Binding series to a scale: xScale, yScale
  • Base color settings: color
You can also obtain getIterator, getResetIterator iterators here

Methods Overview

Specific settings
legendItem()Legend item settings.
Coloring
color()Color settings.
Data
data()Data settings.
meta()Meta data settings.
name()Series name settings.
Interactivity
hover()Sets the hover state on a point or a series.
tooltip()Tooltip settings.
Point Elements
hoverLabels()Labels settings.
labels()Labels settings.
Scales
xScale()X-scale settings.
yScale()Y-scale settings.

Methods Description

color

Getter for current series color.

Returns:

anychart.graphics.vector.Fill - Current color.

Try it:

Sets color settings using an object or a string. Learn more about coloring.

Params:

Name Type Default Description
value anychart.graphics.vector.Fill
"#64b5f6"
Color as an object or a string.

Returns:

anychart.core.polar.series.Base - Self instance for method chaining.
Color with opacity.
Note: If color is set as a string (e.g. 'red .5') it has a priority over opt_opacity, which means: color set like this rect.fill('red 0.3', 0.7) will have 0.3 opacity.

Params:

Name Type Description
color string Color as a string.
opacity number Color opacity.

Returns:

anychart.core.polar.series.Base - Self instance for method chaining.

Try it:

Linear gradient. Learn more about coloring.

Params:

Name Type Description
keys Array.<(anychart.graphics.vector.GradientKey|string)> Gradient keys.
angle number Gradient angle.
mode boolean | anychart.graphics.vector.Rect | Object Gradient mode.
opacity number Gradient opacity.

Returns:

anychart.core.polar.series.Base - Self instance for method chaining.

Try it:

Radial gradient. Learn more about coloring.

Params:

Name Type Description
keys Array.<(anychart.graphics.vector.GradientKey|string)> Color-stop gradient keys.
cx number X ratio of center radial gradient.
cy number Y ratio of center radial gradient.
mode anychart.graphics.math.Rect If defined then userSpaceOnUse mode, else objectBoundingBox.
opacity number Opacity of the gradient.
fx number X ratio of focal point.
fy number Y ratio of focal point.

Returns:

anychart.core.polar.series.Base - Self instance for method chaining.

Try it:

data

Getter for series mapping.

Returns:

anychart.data.View - Returns current mapping.

Try it:

Setter for series mapping.

Params:

Name Type Description
value anychart.data.View | anychart.data.Set | Array | string Value to set.
csvSettings Object.<string, (string|boolean)> If CSV string is passed by first param, you can pass CSV parser settings here as a hash map.

Returns:

anychart.core.polar.series.Base - Self instance for method chaining.

hover

Sets the hover state on a point or a series.

Params:

Name Type Description
index number Point index.

Returns:

anychart.core.polar.series.Base - Self instance for method chaining.

hoverLabels

Getter for the current series hover data labels.

Returns:

anychart.core.ui.LabelsFactory - Labels instance.

Try it:

Setter for the series hover data labels.

Params:

Name Type Default Description
value Object | boolean | null
null
Series data labels settings.

Returns:

anychart.core.polar.series.Base - Self instance for method chaining.

labels

Getter for current series data labels.

Returns:

anychart.core.ui.LabelsFactory - Labels instance.

Try it:

Setter for series data labels.

Params:

Name Type Default Description
value Object | boolean | null
false
Series data labels settings.

Returns:

anychart.core.polar.series.Base - Self instance for method chaining.

legendItem

Getter for legend item settings of series.

Returns:

anychart.core.utils.LegendItemSettings - Legend item settings.
Setter for legend item settings of series.

Params:

Name Type Description
value Object Legend item settings object.

Returns:

anychart.core.polar.series.Base - Self instance for method chaining.

Try it:

meta

Getter for series meta data.

Params:

Name Type Description
key * Metadata key.

Returns:

* - Metadata object by key.

Try it:

Setter for series meta data.

Params:

Name Type Description
object * Object to replace metadata.

Returns:

anychart.core.polar.series.Base - Self instance for method chaining.
Sample for series meta data.
chart.line([1,2,3]).meta({
    'location': 'QA',
    'source': 'https://some-url.dmn',
    'imageSRC': 'https://some-url.dmn/getImage.php?bySomeParam=Value'
});
Add/Replace meta data for series by key.

Params:

Name Type Description
key string Metadata key.
value * Metadata value.

Returns:

anychart.core.polar.series.Base - Self instance for method chaining.
Sample: meta data for series by key.
var series = chart.line([1,2,3]);
series.meta('location', 'QA');
series.meta('source', 'https://some-url.dmn');
series.meta('imageSRC', 'https://some-url.dmn/getImage.php?bySomeParam=Value');

name

Getter for series name.

Returns:

string undefined - Series name value.

Try it:

Setter for series name.
Basically, name of series is used in Legend displaying, but it can be used in tooltips as well.

Params:

Name Type Default Description
value string
undefined
Value to set.

Returns:

anychart.core.polar.series.Base - Self instance for method chaining.

Try it:

tooltip

Getter for current series data tooltip.

Returns:

anychart.core.ui.Tooltip - Tooltip instance.

Try it:

Setter for series data tooltip.

Params:

Name Type Default Description
value Object | boolean | null
true
Tooltip settings.

Returns:

anychart.core.polar.series.Base - Self instance for method chaining.

xScale

Getter for current series X scale.

Returns:

anychart.scales.Base - Current series X Scale.

Try it:

Setter for series X scale.

Params:

Name Type Default Description
value anychart.scales.Base
"linear"
Value to set.

Returns:

anychart.core.polar.series.Base - Self instance for method chaining.

Try it:

yScale

Getter for current series Y scale.

Returns:

anychart.scales.Base - Current series Y Scale.

Try it:

Setter for series Y scale.

Params:

Name Type Default Description
value anychart.scales.Base
"linear"
Value to set.

Returns:

anychart.core.polar.series.Base - Self instance for method chaining.

Try it: