AnyChart
API Reference
Still have questions?
Contact support
Top

class anychart.standalones.axes.Polar Improve this Doc

Extends: anychart.core.axes.Polar

The Polar class contains methods for configuring standalones Polar axes.
This class allow to create custom Polar axes or add them to charts.

Methods Overview

Specific settings
labels()Labels settings.
minorLabels()Minor labels settings.
minorTicks()Minor ticks settings.
overlapMode()Overlap mode for labels.
scale()Scale settings.
ticks()Ticks settings.
Coloring
fill()Fill settings for the polar axis.
stroke()Stroke settings.
Interactivity
enabled()Element state (enabled or disabled).
Size and Position
getRemainingBounds()Returns remaining parent bounds to use elsewhere.
parentBounds()Parent bounds for the polar axis.
startAngle()Start angle for the polar axis.
zIndex()Z-index of the element.
Miscellaneous
container()Container for the polar axis.
draw()Drawing of the polar axis.

Methods Description

container

Getter for the axis container.
Setter for the axis container.

Params:

NameTypeDescription
elementanychart.graphics.vector.Layer | anychart.graphics.vector.Stage | string | ElementThe value to set.

Returns:

anychart.standalones.axes.Polar - Self instance for method chaining.

draw

Drawing of the polar axis.

Returns:

anychart.standalones.axes.Polar - Self instance for method chaining.

enabled

Getter for the element state (enabled or disabled).

Returns:

boolean - Element state.
Setter for the element enabled state.

Params:

NameTypeDefaultDescription
enabledboolean
true
Enabled state to set.

Returns:

anychart.standalones.axes.Polar - Self instance for method chaining.
Example.
if (!element.enabled())
   element.enabled(true);

fill

Getter for the fill.

Returns:

anychart.graphics.vector.Fill - Fill settings.
See listing
var xAxis = chart.xAxis();
var fill = xAxis.fill();
Setter for fill settings using an array, an object or a string. Learn more about coloring.

Params:

NameTypeDescription
coloranychart.graphics.vector.Fill | Array.<(anychart.graphics.vector.GradientKey|string)>Color as an array, an object or a string.

Returns:

anychart.standalones.axes.Polar - Self instance for method chaining.
Fill color with opacity.

Params:

NameTypeDescription
colorstringColor as a string.
opacitynumberColor opacity.

Returns:

anychart.standalones.axes.Polar - Self instance for method chaining.
Linear gradient fill. Learn more about coloring.

Params:

NameTypeDescription
keysArray.<(anychart.graphics.vector.GradientKey|string)>Gradient keys.
anglenumberGradient angle.
modeboolean | anychart.graphics.vector.Rect | ObjectGradient mode.
opacitynumberGradient opacity.

Returns:

anychart.standalones.axes.Polar - Self instance for method chaining.
Radial gradient fill. Learn more about coloring.

Params:

NameTypeDescription
keysArray.<(anychart.graphics.vector.GradientKey|string)>Color-stop gradient keys.
cxnumberX ratio of center radial gradient.
cynumberY ratio of center radial gradient.
modeanychart.graphics.math.RectIf defined then userSpaceOnUse mode, else objectBoundingBox.
opacitynumberOpacity of the gradient.
fxnumberX ratio of focal point.
fynumberY ratio of focal point.

Returns:

anychart.standalones.axes.Polar - Self instance for method chaining.

Params:

NameTypeDescription
imageSettingsanychart.graphics.vector.FillObject with settings.

Returns:

anychart.standalones.axes.Polar - Self instance for method chaining.

getRemainingBounds

Returns remaining parent bounds to use elsewhere.

Returns:

anychart.math.Rect - Parent bounds without the space used by the axis.

labels

Getter for axis labels.

Returns:

anychart.core.ui.LabelsFactory - Axis labels instance.
Setter for axis labels.
Labels layout can be changed using the anychart.core.ui.LabelsFactory#position method.

Params:

NameTypeDefaultDescription
settingsObject | boolean | null
true
Axis labels.

Returns:

anychart.standalones.axes.Polar - Self instance for method chaining.

minorLabels

Getter for axis minor labels.

Returns:

anychart.core.ui.LabelsFactory - Axis labels instance.
Setter for axis minor labels.

Params:

NameTypeDefaultDescription
settingsObject | boolean | null
false
Axis labels.

Returns:

anychart.standalones.axes.Polar - Self instance for method chaining.

minorTicks

Getter for minor axis ticks.

Returns:

anychart.core.axes.Ticks - Axis ticks.
Setter for minor axis ticks.

Params:

NameTypeDefaultDescription
settingsObject | boolean | null
false
Axis ticks.

Returns:

anychart.standalones.axes.Polar - Self instance for method chaining.

overlapMode

Getter for labels overlap mode for.

Returns:

anychart.enums.LabelsOverlapMode | string - Overlap mode.
See listing
var xAxis = chart.xAxis();
var mode = xAxis.overlapMode();
Setter for labels overlap mode.

Params:

NameTypeDefaultDescription
modeanychart.enums.LabelsOverlapMode | string
'noOverlap'
Value to set.

Returns:

anychart.standalones.axes.Polar - Self instance for method chaining.

parentBounds

Getter for bounds.

Returns:

anychart.math.Rect - Axis parent bounds.
Setter for bounds using single value.

Params:

NameTypeDescription
boundsanychart.math.Rect | Object | nullBounds to set.

Returns:

anychart.standalones.axes.Polar - Self instance for method chaining.
Setter for bounds using several values.

Params:

NameTypeDescription
leftnumberLeft space.
topnumberTop space.
widthnumberWidth axis.
heightnumberHeight axis.

Returns:

anychart.standalones.axes.Polar - Self instance for method chaining.

scale

Getter for the axis scale.

Returns:

anychart.scales.ScatterBase - Axis scale.
Setter for the axis scale.

Params:

NameTypeDefaultDescription
settingsanychart.scales.ScatterBase | anychart.enums.ScaleTypes | string | Object
anychart.scales.Linear
Scale settings to set.

Returns:

anychart.standalones.axes.Polar - Self instance for method chaining.

startAngle

Getter for a start angle.

Returns:

string | number - The start angle.
Setter for a start angle.

Params:

NameTypeDefaultDescription
anglestring | number
0
Start angle to set.

Returns:

anychart.standalones.axes.Polar - Self instance for method chaining.

stroke

Getter for axis stroke settings.

Returns:

anychart.graphics.vector.Stroke - Axis stroke settings.
See listing
var xAxis = chart.xAxis();
var stroke = xAxis.stroke();
Setter for axis stroke settings. Learn more about stroke settings.

Params:

NameTypeDefaultDescription
coloranychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | null
'#eaeaea'
Stroke settings.
thicknessnumber
1
Line thickness.
dashpatternstring
Controls the pattern of dashes and gaps used to stroke paths.
lineJoinstring | anychart.graphics.vector.StrokeLineJoin
Line join style.
lineCapstring | anychart.graphics.vector.StrokeLineCap
Line cap style.

Returns:

anychart.standalones.axes.Polar - Self instance for method chaining.
Setter for axis stroke settings using an object.

Params:

NameTypeDescription
settingsObjectObject with stroke settings from anychart.graphics.vector.Stroke

Returns:

anychart.standalones.axes.Polar - Self instance for method chaining.

ticks

Getter for axis ticks.

Returns:

anychart.core.axes.Ticks - Axis ticks.
Setter for axis ticks.

Params:

NameTypeDefaultDescription
settingsObject | boolean | null
true
Axis ticks.

Returns:

anychart.standalones.axes.Polar - Self instance for method chaining.

zIndex

Getter for the Z-index of the element.

Returns:

number - Z-index.
Setter for the Z-index of the element.

Params:

NameTypeDefaultDescription
zIndexnumber
0
Value to set.

Returns:

anychart.standalones.axes.Polar - Self instance for method chaining.