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

class anychart.core.axes.Circular Improve this Doc

Methods Overview

Specific settings
cornersRounding()Rounding of corners
minorTicks()Minor ticks settings.
scale()Scale settings.
startAngle()Start angle settings.
sweepAngle()Sweep angle.
ticks()Ticks settings.
Coloring
fill()Fill 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).
Labels
drawFirstLabel()Drawing of the first label
drawLastLabel()Drawing of the last label
labels()Labels settings.
minorLabels()Minor labels settings.
overlapMode()Overlap mode for labels.
Size and Position
radius()Axis radius.
width()Axis width.
zIndex()Z-index of the element.

Methods Description

cornersRounding

Getter for the rounding of corners.

Returns:

string - The radius of corners rounding in percent.
Setter for the rounding of corners. Round off the ends of axes to the specified radius.

Params:

NameTypeDefaultDescription
valuenull | number | string
"0%"
Radius for rounding of corners

Returns:

anychart.core.axes.Circular - Self instance for method chaining.

drawFirstLabel

Getter for the first label drawing flag.

Returns:

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

Params:

NameTypeDefaultDescription
valueboolean
true
Drawing flag.

Returns:

anychart.core.axes.Circular - Self instance for method chaining.

drawLastLabel

Getter for the last label drawing flag.

Returns:

boolean - Drawing flag.
Setter for the last label drawing flag.

Params:

NameTypeDefaultDescription
valueboolean
true
Drawing flag.

Returns:

anychart.core.axes.Circular - 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.axes.Circular - Self instance for method chaining.
Example.
if (!element.enabled())
   element.enabled(true);

fill

Getter for the axis fill color.

Returns:

anychart.graphics.vector.Fill - Axis fill color.
Setter for axis fill settings using an array or a string. Learn more about coloring.

Params:

NameTypeDefaultDescription
valueanychart.graphics.vector.Fill | string
"#CECECE"
Color as an object or a string.

Returns:

anychart.core.axes.Circular - Self instance for method chaining.
Axis fill color with opacity. Fill as a string or an object.

Params:

NameTypeDescription
colorstringColor as a string.
opacitynumberColor opacity.

Returns:

anychart.core.axes.Circular - Self instance for method chaining.
Linear gradient axis 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.axes.Circular - Self instance for method chaining.
Radial axis 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.axes.Circular - Self instance for method chaining.

Params:

NameTypeDescription
imageSettingsanychart.graphics.vector.FillObject with settings.

Returns:

anychart.core.axes.Circular - Self instance for method chaining.

labels

Getter for labels.

Returns:

anychart.core.ui.LabelsFactory - Axis labels.
Setter for labels.

Params:

NameTypeDefaultDescription
valueObject | boolean | null
true
Labels settings.

Returns:

anychart.core.axes.Circular - Self instance for method chaining.

listen

Adds an event listener to an implementing object.

Params:

NameTypeDefaultDescription
typestring
The event type id.
listenerfunction
Callback method. Function that looks like function(event){ // event.actualTarget - actual event target // event.currentTarget - current event target // event.iterator - event iterator // event.originalEvent - original event // event.point - event point // event.pointIndex - event point index }.
useCaptureboolean
false
Whether to fire in capture phase. Learn more about capturing https://javascript.info/bubbling-and-capturing
listenerScopeObject
Object in whose scope to call the listener.

Returns:

Object - Unique key for the listener.

listenOnce

Adds an event listener to an implementing object.

Params:

NameTypeDefaultDescription
typestring
The event type id.
listenerfunction
Callback method.
useCaptureboolean
false
Whether to fire in capture phase. Learn more about capturing https://javascript.info/bubbling-and-capturing
listenerScopeObject
Object in whose scope to call the listener.

Returns:

Object - Unique key for the listener.

minorLabels

Getter for minor labels.

Returns:

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

Params:

NameTypeDefaultDescription
valueObject | boolean | null
false
Minor labels settings.

Returns:

anychart.core.axes.Circular - Self instance for method chaining.

minorTicks

Getter for minor axis ticks.

Returns:

anychart.core.axes.CircularTicks - Minor ticks.
Setter for minor axis ticks.

Params:

NameTypeDefaultDescription
valueObject | boolean | null
false
Minor ticks settings.

Returns:

anychart.core.axes.Circular - Self instance for method chaining.

overlapMode

Getter for labels overlap mode.

Returns:

anychart.enums.LabelsOverlapMode | string - Overlap mode.
Setter for labels overlap mode.

Params:

NameTypeDefaultDescription
valueanychart.enums.LabelsOverlapMode | string | boolean
"noOverlap"
Value to set.

Returns:

anychart.core.axes.Circular - Self instance for method chaining.

print

Prints all elements on related stage.

Params:

NameTypeDefaultDescription
paperSizeOrOptionsanychart.graphics.vector.PaperSize | Object
Paper size or object with options.
landscapeboolean
false
Flag of landscape.

radius

Getter for the axis radius.

Returns:

string - The axis radius.
Setter for the axis radius.

Params:

NameTypeDefaultDescription
valuenull | number | string
undefined
Value to set.

Returns:

anychart.core.axes.Circular - Self instance for method chaining.

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.

scale

Getter for the axis scale.

Params:

NameTypeDescription
valueanychart.enums.GaugeScaleTypes | anychart.scales.Linear | anychart.scales.Logarithmic | stringScale to set.

Returns:

anychart.core.axes.Circular - Self instance for method chaining.

startAngle

Getter for the start angle.

Returns:

number - The start angle.
Setter for the start angle.

Params:

NameTypeDefaultDescription
valuenull | string | number
null
Value to set.

Returns:

anychart.core.axes.Circular - Self instance for method chaining.

sweepAngle

Getter for the sweep angle.

Returns:

number - The sweep angle.
Setter for the sweep angle.

Params:

NameTypeDefaultDescription
valuenull | string | number
undefined
Value to set.

Returns:

anychart.core.axes.Circular - Self instance for method chaining.

ticks

Getter for circular ticks.

Returns:

anychart.core.axes.CircularTicks - Axis ticks.
Setter for circular ticks.

Params:

NameTypeDefaultDescription
valueObject | boolean | null
true
Ticks settings.

Returns:

anychart.core.axes.Circular - Self instance for method chaining.

unlisten

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

Params:

NameTypeDefaultDescription
typestring
The event type id.
listenerfunction
Callback method.
useCaptureboolean
false
Whether to fire in capture phase. Learn more about capturing https://javascript.info/bubbling-and-capturing
listenerScopeObject
Object 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.

width

Getter for the axis width.

Returns:

string - The axis width.
Setter for the axis width.

Params:

NameTypeDefaultDescription
valuenull | number | string
undefined
Value to set.

Returns:

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