AnyChart
API Reference
Still have questions?
Contact support
Top
You are looking at an outdated 7.10.0 version of this document. Switch to the 8.4.0 version to see the up to date information.

class anychart.core.grids.Polar Improve this Doc

Methods Overview

Specific settings
axis()Axis settings.
drawLastLine()Drawing last line.
isMinor()Minor grid or not.
Coloring
evenFill()Even fill settings.
oddFill()Odd fill settings.
stroke()Stroke settings.
Events
listen()Adds an event listener.
listenOnce()Adds a single time event listener.
removeAllListeners()Removes all listeners.
unlisten()Removes the listener.
unlistenByKey()Removes the listener by the key.
Export
print()Prints all elements.
Interactivity
enabled()Element state (enabled or disabled).
Scales
xScale()X-scale settings.
Size and Position
isRadial()Whether an grid has radial layout.
layout()Layout setting.
zIndex()Z-index of the element.

Methods Description

axis

Getter for the current polar grid axis.

Returns:

anychart.core.axes.Polar | anychart.core.axes.Radial - The current polar grid axis.
Setter for the polar grid axis.

Params:

NameTypeDescription
valueanychart.core.axes.Polar | anychart.core.axes.RadialValue to set.

Returns:

anychart.core.grids.Polar - Self instance for method chaining.

drawLastLine

Getter for the first line drawing flag.

Returns:

boolean - Drawing flag.
Setter for the first line drawing flag.

Params:

NameTypeDefaultDescription
valueboolean
true
Whether grid should draw last line.

Returns:

anychart.core.grids.Polar - Self instance for method chaining

enabled

Getter for the current element state (enabled or disabled).

Returns:

boolean - The current element state.
Setter for the element enabled state.

Params:

NameTypeDefaultDescription
valueboolean
true
Value to set.

Returns:

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

evenFill

Getter for the current grid even fill settings.

Returns:

string | anychart.graphics.vector.Fill - The current grid even fill settings.
Sets even fill settings using an array or a string. Learn more about coloring.

Params:

NameTypeDefaultDescription
valueanychart.graphics.vector.Fill
"#f5f5f5 0.3"
Color as an array or a string.

Returns:

anychart.core.grids.Polar - Self instance for method chaining.
Fill color with opacity. Fill as a string or an object.

Params:

NameTypeDefaultDescription
colorstring
"#f5f5f5"
Color as a string.
opacitynumber
0.3
Color opacity.

Returns:

anychart.core.grids.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.core.grids.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.core.grids.Polar - Self instance for method chaining.

Params:

NameTypeDescription
imageSettingsanychart.graphics.vector.FillObject with settings.

Returns:

anychart.core.grids.Polar - Self instance for method chaining.

isMinor

Getter for the minor grid state flag.

Returns:

boolean - State flag.
Setter for the minor grid state flag.

Params:

NameTypeDefaultDescription
valueboolean
false
Minor or not.

Returns:

anychart.core.grids.Polar - Is minor grid or Grid instance for method chaining.

isRadial

Whether an grid has radial layout.
Layout is define by anychart.core.grids.Polar#layout method.

Returns:

boolean - Returns true if the grid's layout is radial.

layout

Getter for the current grid layout.

Returns:

anychart.enums.RadialGridLayout - The current grid layout.
Setter for the grid layout.

Params:

NameTypeDefaultDescription
valueanychart.enums.RadialGridLayout | string
"circuit"
Grid layout.

Returns:

anychart.core.grids.Polar - Self instance for method chaining.

listen

Adds an event listener to an implementing object.

Params:

NameTypeDescription
typestringThe event type id.
listenerfunctionCallback method.
useCapturebooleanWhether to fire in capture phase (defaults to false).
listenerScopescopeObject in whose scope to call the listener.

Returns:

Object - Unique key for the listener.

listenOnce

Adds an event listener to an implementing object.

Params:

NameTypeDescription
typestringThe event type id.
listenerfunctionCallback method.
useCapturebooleanWhether to fire in capture phase (defaults to false).
listenerScopescopeObject in whose scope to call the listener.

Returns:

Object - Unique key for the listener.

oddFill

Getter for the current grid odd fill settings.

Returns:

string | anychart.graphics.vector.Fill - The current grid odd fill settings.
Sets odd fill settings using an array or a string. Learn more about coloring.

Params:

NameTypeDefaultDescription
valueanychart.graphics.vector.Fill
"#fff 0.3"
Color as an array or a string.

Returns:

anychart.core.grids.Polar - Self instance for method chaining.
Fill color with opacity. Fill as a string or an object.

Params:

NameTypeDefaultDescription
colorstring
"#fff"
Color as a string.
opacitynumber
0.3
Color opacity.

Returns:

anychart.core.grids.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.core.grids.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.core.grids.Polar - Self instance for method chaining.

Params:

NameTypeDescription
imageSettingsanychart.graphics.vector.FillObject with settings.

Returns:

anychart.core.grids.Polar - Self instance for method chaining.

print

Prints all elements on related stage.

Params:

NameTypeDefaultDescription
paperSizeanychart.graphics.vector.PaperSize
Paper size.
landscapeboolean
false
Flag of landscape.

removeAllListeners

Removes all listeners from an object. You can also optionally remove listeners of some particular type.

Params:

NameTypeDescription
typestringType of event to remove, default is to remove all types.

Returns:

number - Number of listeners removed.

stroke

Getter for the current grid stroke line.

Returns:

string | anychart.graphics.vector.Stroke - The current grid stroke line settings.
Setter for the grid stroke settings. Learn more about stroke settings.

Params:

NameTypeDefaultDescription
valueanychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | null
"#c1c1c1"
Stroke settings.
thicknessnumber
1
Line thickness.
dashpatternstring
Controls the pattern of dashes and gaps used to stroke paths.
lineJoinanychart.graphics.vector.StrokeLineJoin
Line join style.
lineCapanychart.graphics.vector.StrokeLineCap
Line cap style.

Returns:

anychart.core.grids.Polar - Self instance for method chaining.

unlisten

Removes a listener added using listen() or listenOnce() methods.

Params:

NameTypeDescription
typestringThe event type id.
listenerfunctionCallback method.
useCapturebooleanWhether to fire in capture phase (defaults to false).
listenerScopescopeObject in whose scope to call the listener.

Returns:

boolean - Whether any listener was removed.

unlistenByKey

Removes an event listener which was added with listen() by the key returned by listen() or listenOnce().

Params:

NameTypeDescription
keyObjectThe key returned by listen() or listenOnce().

Returns:

boolean - Whether any listener was removed.

xScale

Getter for the current grid xScale.

Returns:

anychart.scales.Base - Grid xScale.
Setter for the grid xScale.

Params:

NameTypeDescription
valueanychart.scales.BaseValue to set.

Returns:

anychart.core.grids.Polar - Self instance for method chaining.

zIndex

Getter for the current Z-index of the element.

Returns:

number - The current zIndex.
Setter for the Z-index of the element.

Params:

NameTypeDefaultDescription
valuenumber
0
Value to set.

Returns:

anychart.core.grids.Polar - Self instance for method chaining.