AxisBase
Type class
Base class for ValueAxis and CategoryAxis. It can not be instantiated explicitly.
Sources
This information about AxisBase is provided for reference only and is not available through exported packages and thus should not be imported or used on its own.
Inheritance
AxisBase does not extend any other symbol.
AxisBase is extended by ValueAxis, ValueAxis, CategoryAxis, CategoryAxis.
Properties
autoGridCountType
booleanDefaulttrueSpecifies whether number of gridCount is specified automatically, acoarding to the axis size.
autoRotateAngleType
numberAngle of label rotation, if the number of series exceeds autoRotateCount. Works on horizontal axis only. It is not recommended to use it with charts with zoom/scroll features, as chart adjusts margin only based on initial render.
autoRotateCountType
numberIf the number of category axis items will exceed the autoRotateCount, the labels will be rotated by autoRotateAngle degree. Works on horizontal axis only. Not recommended with scrollable/zoomable charts.
axisAlphaType
numberDefault1Axis opacity. Value range is 0 - 1.
axisColorType
colorDefault#000000Axis color.
axisThicknessType
numberDefault1Thickness of the axis.
boldLabelsType
booleanDefaultfalseSpecifies if axis labels should be bold or not.
boldPeriodBeginningType
booleanDefaulttrueWhen parse dates is on for the category axis, the chart will try to highlight the beginning of the periods, like month, in bold. Set this to false to disable the functionality.
centerLabelOnFullPeriodType
booleanDefaulttrueThis setting works only when parseDates is set to true and equalSpacing is set to false. In case you set it to false, labels will never be centered between grid lines.
centerLabelsType
booleanDefaultfalseForce-centers labels of date-based axis (in case it's category axis, equalSpacing must be false)
centerRotatedLabelsType
booleanDefaultfalseIn case you have rotated labels on horizontal axis, you can force-center them using this property.
colorType
colorColor of axis value labels. Will use chart's color if not set.
dashLengthType
numberDefault0Length of a dash. 0 means line is not dashed.
dateFormatsType
object[]Default[ { "period": "fff", "format": "JJ:NN:SS" }, { "period": "ss", "format": "JJ:NN:SS" }, { "period": "mm", "format": "JJ:NN" }, { "period": "hh", "format": "JJ:NN" }, { "period": "DD", "format": "MMM DD" }, { "period": "WW", "format": "MMM DD" }, { "period": "MM", "format": "MMM" }, { "period": "YYYY", "format": "YYYY" } ]Date formats of different periods. Possible period values: fff - milliseconds, ss - seconds, mm - minutes, hh - hours, DD - days, MM - months, WW - weeks, YYYY - years. Check this page for date formatting strings.
fillAlphaType
numberDefault0Fill opacity. Every second space between grid lines can be filled with color. Set fillAlpha to a value greater than 0 to see the fills.
fillColorType
colorDefault#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.
firstDayOfWeekType
numberDefault1Sets first day of the week. 0 is Sunday, 1 is Monday, etc.
fontSizeType
numberSize of value labels text. Will use chart's fontSize if not set.
gridAlphaType
numberDefault0.15Opacity of grid lines.
gridColorType
colorDefault#000000Color of grid lines.
gridCountType
numberDefault5Number 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.
gridThicknessType
numberDefault1Thickness of grid lines.
guidesType
Guide[]Default[]The array of guides belonging to this axis.
ignoreAxisWidthType
booleanDefaultfalseIf autoMargins of a chart is set to true, but you want this axis not to be measured when calculating margin, set ignoreAxisWidth to true.
insideType
booleanDefaultfalseSpecifies whether values should be placed inside or outside plot area.
labelFrequencyType
numberDefault1Frequency at which labels should be placed. Doesn't work for CategoryAxis if parseDates is set to true.
labelOffsetType
numberDefault0You can use it to adjust position of axes labels. Works both with CategoryAxis and ValueAxis.
labelRotationType
numberDefault0Rotation angle of a label. Only horizontal axis' values can be rotated. If you set this for vertical axis, the setting will be ignored. Possible values from -90 to 90.
labelsEnabledType
booleanDefaulttrueSpecifies whether axis displays category axis' labels and value axis' values.
listenersType
object[]You can add listeners of events using this property. Example: listeners = [{"event":"clickItem", "method":handleEvent}];
markPeriodChangeType
booleanDefaulttrueIf you set it to false, the start of longer periods won't use a different date format and won't be bold.
minHorizontalGapType
numberDefault75This property is used when calculating grid count (when autoGridCount is true). It specifies minimum cell width required for one span between grid lines.
minorGridAlphaType
numberDefault0.07Opacity of minor grid. In order minor to be visible, you should set minorGridEnabled to true.
minorGridEnabledType
booleanDefaultfalseSpecifies if minor grid should be displayed.
NOTE: If equalSpacing is set to true, this setting will be ignored.
minorTickLengthType
numberDefault0Length of minor grid tick.
minVerticalGapType
numberDefault35This property is used when calculating grid count (when autoGridCount is true). It specifies minimum cell height required for one span between grid lines.
offsetType
numberDefault0The distance of the axis to the plot area, in pixels. Negative values can also be used.
positionType
stringDefaultbottomPossible values are: "top", "bottom", "left", "right". If axis is vertical, default position is "left". If axis is horizontal, default position is "bottom".
showFirstLabelType
booleanDefaulttrueWhether to show first axis label or not. This works properly only on ValueAxis. With CategoryAxis it wont work 100%, it depends on the period, zooming, etc. There is no guaranteed way to force category axis to show or hide first label.
showLastLabelType
booleanDefaulttrueWhether to show last axis label or not. This works properly only on ValueAxis. With CategoryAxis it wont work 100%, it depends on the period, zooming, etc. There is no guaranteed way to force category axis to show or hide last label.
tickLengthType
numberDefault5Length of the tick marks.
titleType
stringTitle of the axis.
titleBoldType
booleanDefaulttrueSpecifies if title should be bold or not.
titleColorType
colorColor of axis title. Will use text color of chart if not set any.
titleFontSizeType
numberFont size of axis title. Will use font size of chart plus two pixels if not set any.
titleRotationType
numberRotation of axis title. Useful if you want to make vertical axis title to be shown from top to down.
Methods
addGuide()Returns
voidAdds guide to the axis.
guide - instance of Guide
removeGuide()Returns
voidRemoves guide from the axis.
guide - instance of Guide
Events
clickGuideParam { type:
"clickGuide", target:AxisBase} &{type: "clickGuide", guide:Guide, chart:AmRectangularChart}Dispatched when user clicks on a guide.
clickItemParam { type:
"clickItem", target:AxisBase} &{type: "clickItem", value:value, serialDataItem:SerialDataItem, axis:AxisBase, target:label, chart:AmRectangularChart, event:MouseEvent}Fired if user clicks on axis label.
rollOutGuideParam { type:
"rollOutGuide", target:AxisBase} &{type: "rollOutGuide", guide:Guide, chart:AmRectangularChart}Dispatched when user rolls-out of the guide.
rollOutItemParam { type:
"rollOutItem", target:AxisBase} &{type: "rollOutItem", value:value, serialDataItem:SerialDataItem, axis:AxisBase, target:label, chart:AmRectangularChart, event:MouseEvent}Fired if user rolls-out of the axis label.
rollOverGuideParam { type:
"rollOverGuide", target:AxisBase} &{type: "rollOverGuide", guide:Guide, chart:AmRectangularChart}Dispatched when user rolls-over some guide.
rollOverItemParam { type:
"rollOverItem", target:AxisBase} &{type: "rollOverItem", value:value, serialDataItem:SerialDataItem, axis:AxisBase, target:label, chart:AmRectangularChart, event:MouseEvent}Fired if user rolls-over axis label.