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:
Name | Type | Description |
---|---|---|
element | anychart.graphics.vector.Layer | anychart.graphics.vector.Stage | string | Element | The value to set. |
Returns:
anychart.standalones.axes.Polar - Self instance for method chaining.Try it:
draw
Drawing of the polar axis.
Returns:
anychart.standalones.axes.Polar - Self instance for method chaining.Try it:
enabled
Getter for the element state (enabled or disabled).
Returns:
boolean - Element state.Try it:
Setter for the element enabled state.
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | true | Enabled state to set. |
Returns:
anychart.standalones.axes.Polar - Self instance for method chaining. Example.
if (!element.enabled()) element.enabled(true);
Try it:
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:
Name | Type | Description |
---|---|---|
color | anychart.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.
Detailed description
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.standalones.axes.Polar - Self instance for method chaining.Try it:
Linear gradient fill.
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.standalones.axes.Polar - Self instance for method chaining.Try it:
Radial gradient fill.
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.standalones.axes.Polar - Self instance for method chaining.Image fill.
Learn more about coloring.
Params:
Name | Type | Description |
---|---|---|
imageSettings | anychart.graphics.vector.Fill | Object with settings. |
Returns:
anychart.standalones.axes.Polar - Self instance for method chaining.Try it:
getRemainingBounds
Returns remaining parent bounds to use elsewhere.
Returns:
anychart.math.Rect - Parent bounds without the space used by the axis.Try it:
labels
Setter for axis labels.
Labels layout can be changed using the anychart.core.ui.LabelsFactory#position method.
Labels layout can be changed using the anychart.core.ui.LabelsFactory#position method.
Detailed description
Sets axis labels settings depending on parameter type:
- null/boolean - disable or enable axis labels.
- object - sets axis labels settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
settings | Object | boolean | null | true | Axis labels. |
Returns:
anychart.standalones.axes.Polar - Self instance for method chaining.minorLabels
Setter for axis minor labels.
Detailed description
Sets axis minor labels settings depending on parameter type:
- null/boolean - disable or enable axis minor labels.
- object - sets axis minor labels settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
settings | Object | boolean | null | false | Axis labels. |
Returns:
anychart.standalones.axes.Polar - Self instance for method chaining.minorTicks
Setter for minor axis ticks.
Detailed description
Sets axis minor ticks settings depending on parameter type:
- null/boolean - disable or enable axis minor ticks.
- object - sets axis minor ticks settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
settings | Object | 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:
Name | Type | Default | Description |
---|---|---|---|
mode | anychart.enums.LabelsOverlapMode | string | 'noOverlap' | Value to set. |
Returns:
anychart.standalones.axes.Polar - Self instance for method chaining.Try it:
parentBounds
Getter for bounds.
Returns:
anychart.math.Rect - Axis parent bounds.Setter for bounds using single value.
Params:
Name | Type | Description |
---|---|---|
bounds | anychart.math.Rect | Object | null | Bounds to set. |
Returns:
anychart.standalones.axes.Polar - Self instance for method chaining.Try it:
Setter for bounds using several values.
Params:
Name | Type | Description |
---|---|---|
left | number | Left space. |
top | number | Top space. |
width | number | Width axis. |
height | number | Height axis. |
Returns:
anychart.standalones.axes.Polar - Self instance for method chaining.Try it:
scale
Setter for the axis scale.
Params:
Name | Type | Default | Description |
---|---|---|---|
settings | anychart.scales.ScatterBase | anychart.enums.ScaleTypes | string | Object | anychart.scales.Linear | Scale settings to set. |
Returns:
anychart.standalones.axes.Polar - Self instance for method chaining.Try it:
startAngle
Getter for a start angle.
Returns:
string | number - The start angle.Setter for a start angle.
Params:
Name | Type | Default | Description |
---|---|---|---|
angle | string | number | 0 | Start angle to set. |
Returns:
anychart.standalones.axes.Polar - Self instance for method chaining.Try it:
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:
Name | Type | Default | Description |
---|---|---|---|
color | anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | null | '#eaeaea' | Stroke settings. |
thickness | number | 1 | Line thickness. |
dashpattern | string | Controls the pattern of dashes and gaps used to stroke paths. | |
lineJoin | string | anychart.graphics.vector.StrokeLineJoin | Line join style. | |
lineCap | string | anychart.graphics.vector.StrokeLineCap | Line cap style. |
Returns:
anychart.standalones.axes.Polar - Self instance for method chaining.Try it:
Setter for axis stroke settings using an object.
Params:
Name | Type | Description |
---|---|---|
settings | Object | Object with stroke settings from anychart.graphics.vector.Stroke |
Returns:
anychart.standalones.axes.Polar - Self instance for method chaining.Try it:
ticks
Setter for axis ticks.
Detailed description
Sets axis ticks settings depending on parameter type:
- null/boolean - disable or enable axis ticks.
- object - sets axis ticks settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
settings | Object | boolean | null | true | Axis ticks. |
Returns:
anychart.standalones.axes.Polar - Self instance for method chaining.zIndex
Setter for the Z-index of the element.
Detailed description
The bigger the index - the higher the element position is.
Params:
Name | Type | Default | Description |
---|---|---|---|
zIndex | number | 0 | Value to set. |
Returns:
anychart.standalones.axes.Polar - Self instance for method chaining.Try it: