class anychart.core.axes.Map Improve this Doc
Extends: anychart.core.VisualBase
Map axis class.
Methods Overview
Specific settings | |
minorTicks() | Minor ticks settings. |
overlapMode() | Overlap mode for labels. |
ticks() | Ticks settings. |
title() | Title settings. |
Coloring | |
stroke() | Stroke settings. |
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. |
Size and Position | |
zIndex() | Z-index of the element. |
Methods Description
drawFirstLabel
Getter for the first label drawing flag.
Returns:
boolean - Drawing flag. See listing
var topAxis = mapAxes.top(); var flag = topAxis.drawFirstLabel();
Setter for the first label drawing flag.
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | true | Value to set. |
Returns:
anychart.core.axes.Map - Self instance for method chaining.Try it:
drawLastLabel
Getter for the last label drawing flag.
Returns:
boolean - Drawing flag. See listing
var topAxis = mapAxes.top(); var flag = topAxis.drawLastLabel();
Setter for the last label drawing flag.
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | true | Value to set. |
Returns:
anychart.core.axes.Map - 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.core.axes.Map - Self instance for method chaining. Example.
if (!element.enabled()) element.enabled(true);
Try it:
labels
Setter for axis labels.
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 | Value to set. |
Returns:
anychart.core.axes.Map - 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 | Value to set. |
Returns:
anychart.core.axes.Map - 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 | Value to set. |
Returns:
anychart.core.axes.Map - Self instance for method chaining.overlapMode
Getter for labels overlap mode.
Returns:
anychart.enums.LabelsOverlapMode | string - Overlap mode.Setter for overlap mode for labels.
Params:
Name | Type | Default | Description |
---|---|---|---|
value | anychart.enums.LabelsOverlapMode | string | 'noOverlap' | Value to set. |
Returns:
anychart.core.axes.Map - Self instance for method chaining.Try it:
stroke
Getter for axis stroke settings.
Returns:
anychart.graphics.vector.Stroke - Axes line stroke settings.Try it:
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 | function | null | 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 | 'round' | Line join style. |
lineCap | string | anychart.graphics.vector.StrokeLineCap | 'square' | Line cap style. |
Returns:
anychart.core.axes.Map - 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.core.axes.Map - 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 | Value to set. |
Returns:
anychart.core.axes.Map - Self instance for method chaining.title
Setter for the axis title.
Detailed description
Sets axis title settings depending on parameter type:
- null/boolean - disable or enable axis title.
- string - sets axis title text value.
- object - sets axis title settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
settings | null | boolean | Object | string | false | Value to set. |
Returns:
anychart.core.axes.Map - 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.core.axes.Map - Self instance for method chaining.Try it: