Important version information!

You are browsing a class reference for deprecated Version 2 of the JavaScript Charts.

Documentation for other versions: amCharts 4 (current) or amCharts 3.

AxisBase

AxisBase is the base class for ValueAxis and CategoryAxis. It can not be instantiated explicitly.

Properties

PropertyTypeDefaultDescription
autoGridCountBooleantrueSpecifies whether number of gridCount is specified automatically, acoarding to the axis size.
axisAlphaNumber1Axis opacity. Value range is 0 - 1.
axisColorString#000000Axis color.
axisThicknessNumber1Thickness of the axis.
colorString Color of axis value labels. Will use chart's color if not set.
dashLengthNumber0Length of a dash. 0 means line is not dashed.
fillAlphaNumber0Fill opacity. Every second space between grid lines can be filled with color. Set fillAlpha to a value greater than 0 to see the fills.
fillColorString#FFFFFFFill color. Every second space between grid lines can be filled with color. Set fillAlpha to a value greater than 0 to see the fills.
fontSizeNumber Size of value labels text. Will use chart's fontSize if not set.
gridAlphaNumber0.2Opacity of grid lines.
gridColorString#000000Color of grid lines.
gridCountNumber5Number of grid lines. In case this is value axis, or your categoryAxis parses dates, the number is approximate. The default value is 5. If you set autoGridCount to true, this property is ignored.
gridThicknessNumber1Thickness of grid lines.
guidesArray The array of guides belonging to this axis.
ignoreAxisWidthBooleanfalseIf autoMargins of a chart is set to true, but you want this axis not to be measured when calculating margin, set ignoreAxisWidth to true.
insideBooleanfalseSpecifies whether values should be placed inside or outside plot area.
labelFrequencyNumber1Frequency at which labels should be placed. Doesn't work for CategoryAxis if parseDates is set to true.
labelRotationNumber0Rotation angle of a label. Only horizontal axis' values can be rotated. If you set this for vertical axis, the setting will be ignored.
labelsEnabledBooleantrueSpecifies whether axis displays category axis' labels and value axis' values.
offsetNumber0The distance of the axis to the plot area, in pixels. Negative values can also be used.
positionString Possible values are: "top", "bottom", "left", "right". If axis is vertical, default position is "left". If axis is horizontal, default position is "bottom".
showFirstLabelBooleantrueWhether to show first axis label or not.
showLastLabelBooleantrueWhether to show last axis label or not.
tickLengthNumber5Length of the tick marks.
titleString Title of the axis.
titleBoldBooleantrueSpecifies if title should be bold or not.
titleColorString Color of axis title. Will use text color of chart if not set any.
titleFontSizeNumber Font size of axis title. Will use font size of chart plus two pixels if not set any.

Methods

NameParametersReturnsDescription
addGuide(guide)guide - instance of GuideAdds guide to the axis.
removeGuide(guide)guide - instance of GuideRemoves guide from the axis.

Events

AxisBase class does not have any events.