Top
You are looking at an outdated 7.13.0 version of this document. Switch to the 8.0.1 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.

Try it:

Setter for the rounding of corners. Round off the ends of axes to the specified radius.

Params:

Name Type Default Description
value null | number | string
"0%"
Radius for rounding of corners

Returns:

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

Try it:

drawFirstLabel

Getter for the first label drawing flag.

Returns:

boolean - Drawing flag.

Try it:

Setter for the first label drawing flag.

Params:

Name Type Default Description
value boolean
true
Drawing flag.

Returns:

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

Try it:

drawLastLabel

Getter for the last label drawing flag.

Returns:

boolean - Drawing flag.

Try it:

Setter for the last label drawing flag.

Params:

Name Type Default Description
value boolean
true
Drawing flag.

Returns:

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

Try it:

enabled

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

Returns:

boolean - The current element state.

Try it:

Setter for the element enabled state.

Params:

Name Type Default Description
value boolean
true
Value to set.

Returns:

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

Try it:

fill

Getter for the axis fill color.

Returns:

anychart.graphics.vector.Fill - Axis fill color.

Try it:

Setter for axis fill settings using an array or a string. Learn more about coloring.

Params:

Name Type Default Description
value anychart.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:

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

Returns:

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

Try it:

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

Try it:

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

Try it:

Image axis fill. Learn more about coloring.

Params:

Name Type Description
imageSettings anychart.graphics.vector.Fill Object with settings.

Returns:

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

Try it:

labels

Getter for labels.

Returns:

anychart.core.ui.LabelsFactory - Axis labels.

Try it:

Setter for labels.

Params:

Name Type Default Description
value Object | 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:

Name Type Description
type string The event type id.
listener function 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 }.
useCapture boolean Whether to fire in capture phase (defaults to false).
listenerScope Object Object in whose scope to call the listener.

Returns:

Object - Unique key for the listener.

Try it:

listenOnce

Adds an event listener to an implementing object.

Params:

Name Type Description
type string The event type id.
listener function Callback method.
useCapture boolean Whether to fire in capture phase (defaults to false).
listenerScope Object Object in whose scope to call the listener.

Returns:

Object - Unique key for the listener.

Try it:

minorLabels

Getter for minor labels.

Returns:

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

Try it:

Setter for minor labels.

Params:

Name Type Default Description
value Object | 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.

Try it:

Setter for minor axis ticks.

Params:

Name Type Default Description
value Object | 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.

Try it:

Setter for labels overlap mode.

Params:

Name Type Default Description
value anychart.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:

Name Type Default Description
paperSizeOrOptions anychart.graphics.vector.PaperSize | Object
Paper size or object with options.
landscape boolean
false
Flag of landscape.

Try it:

radius

Getter for the axis radius.

Returns:

string - The axis radius.

Try it:

Setter for the axis radius.

Params:

Name Type Default Description
value null | number | string
undefined
Value to set.

Returns:

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

Try it:

removeAllListeners

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

Params:

Name Type Description
type string Type of event to remove, default is to remove all types.

Returns:

number - Number of listeners removed.

Try it:

scale

Getter for the axis scale.

Try it:

Params:

Name Type Description
value anychart.enums.GaugeScaleTypes | anychart.scales.Linear | anychart.scales.Logarithmic | string Scale to set.

Returns:

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

startAngle

Getter for the start angle.

Returns:

number - The start angle.

Try it:

Setter for the start angle.

Params:

Name Type Default Description
value null | string | number
null
Value to set.

Returns:

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

Try it:

sweepAngle

Getter for the sweep angle.

Returns:

number - The sweep angle.

Try it:

Setter for the sweep angle.

Params:

Name Type Default Description
value null | string | number
undefined
Value to set.

Returns:

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

Try it:

ticks

Getter for circular ticks.

Returns:

anychart.core.axes.CircularTicks - Axis ticks.

Try it:

Setter for circular ticks.

Params:

Name Type Default Description
value Object | 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:

Name Type Description
type string The event type id.
listener function Callback method.
useCapture boolean Whether to fire in capture phase (defaults to false).
listenerScope Object Object in whose scope to call the listener.

Returns:

boolean - Whether any listener was removed.

Try it:

unlistenByKey

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

Params:

Name Type Description
key Object The key returned by listen() or listenOnce().

Returns:

boolean - Whether any listener was removed.

Try it:

width

Getter for the axis width.

Returns:

string - The axis width.

Try it:

Setter for the axis width.

Params:

Name Type Default Description
value null | number | string
undefined
Value to set.

Returns:

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

Try it:

zIndex

Getter for the current Z-index of the element.

Returns:

number - The current zIndex.

Try it:

Setter for the Z-index of the element.

Params:

Name Type Default Description
value number
0
Value to set.

Returns:

anychart.core.VisualBase - Self instance for method chaining.

Try it: