ValueAxis
Type class
ValueAxis is the class which displays value axis for the chart. The chart can have any number of value axes. For Serial chart one value axis is created automatically. For XY Chart two value axes (horizontal and vertical) are created automatically.
Sources
This information about ValueAxis is provided for reference only and is not available through exported packages and thus should not be imported or used on its own.
Inheritance
ValueAxis extends AxisBase.
ValueAxis is not extended by any other symbol.
Properties
axisTitleOffsetType
numberDefault10Radar chart only. Specifies distance from axis to the axis title (category)
baseCoordType
numberDefaultRead-only. Coordinate of the base value.
baseValueType
numberDefault0Specifies base value of the axis.
durationType
stringDefaultIf your values represents time units, and you want value axis labels to be formatted as duration, you have to set the duration unit. Possible values are: "ss", "mm", "hh" and "DD".
durationUnitsType
objectDefault{DD:"d. ", hh:":", mm:":",ss:""}If duration property is set, you can specify what string should be displayed next to day, hour, minute and second.
gridTypeType
stringDefaultpolygonsRadar chart only. Possible values are: "polygons" and "circles". Set "circles" for polar charts.
includeGuidesInMinMaxType
booleanDefaultfalseSpecifies whether guide values should be included when calculating min and max of the axis.
includeHiddenType
booleanDefaultfalseIf true, the axis will include hidden graphs when calculating min and max values.
integersOnlyType
booleanDefaultfalseSpecifies whether values on axis can only be integers or both integers and doubles.
labelFunctionType
FunctionYou can use this function to format Value axis labels. This function is called and these parameters are passed: labelFunction(value, valueText, valueAxis);
Where value is numeric value, valueText is formatted string and valueAxis is a reference to valueAxis object. Your function should return string.
logarithmicType
booleanDefaultfalseSpecifies if this value axis' scale should be logarithmic.
maxType
numberDefaultRead-only. Maximum value of the axis.
maximumType
numberDefaultIf you don't want max value to be calculated by the chart, set it using this property. This value might still be adjusted so that it would be possible to draw grid at rounded intervals.
minType
numberDefaultRead-only. Minimum value of the axis.
minimumType
numberDefaultIf you don't want min value to be calculated by the chart, set it using this property. This value might still be adjusted so that it would be possible to draw grid at rounded intervals.
minMaxMultiplierType
numberDefaultIf set value axis scale (min and max numbers) will be multiplied by it. I.e. if set to 1.2 the scope of values will increase by 20%.
precisionType
numberDefaultPrecision (number of decimals) of values.
radarCategoriesEnabledType
booleanDefaulttrueRadar chart only. Specifies if categories (axes' titles) should be displayed near axes)
recalculateToPercentsType
booleanDefaultfalsepecifies if graphs's values should be recalculated to percents.
reversedType
booleanDefaultfalseSpecifies if value axis should be reversed (smaller values on top).
stackTypeType
stringDefaultnoneStacking mode of the axis. Possible values are: "none", "regular", "100%", "3d".
Note, only graphs of one type will be stacked.
stepType
numberDefaultRead-only. Value difference between two grid lines.
synchronizationMultiplierType
numberDefaultIn case you synchronize one value axis with another, you need to set the synchronization multiplier. Use synchronizeWithAxis method to set with which axis it should be synced.
totalTextType
stringDefaultIf this value axis is stacked and has columns, setting valueAxis.totalText = "
total" will make it to display total value above the most-top column.totalTextColorType
Hex stringColor of total text.
unitType
stringDefaultUnit which will be added to the value label.
unitPositionType
stringDefaultrightPosition of the unit. Possible values are "left" and "right".
usePrefixesType
booleanDefaultfalseIf true, prefixes will be used for big and small numbers. You can set arrays of prefixes directly to the chart object via prefixesOfSmallNumbers and prefixesOfBigNumbers.
useScientificNotationType
booleanDefaultfalseIf true, values will always be formatted using scientific notation (5e+8, 5e-8...) Otherwise only values bigger then 1e+21 and smaller then 1e-7 will be displayed in scientific notation.
28 inherited items
autoGridCountType
booleanDefaulttrueInherited fromAxisBaseSpecifies whether number of gridCount is specified automatically, acoarding to the axis size.
axisAlphaType
numberDefault1Inherited fromAxisBaseAxis opacity. Value range is 0 - 1.
axisColorType
stringDefault#000000Inherited fromAxisBaseAxis color.
axisThicknessType
numberDefault1Inherited fromAxisBaseThickness of the axis.
colorType
stringDefaultInherited fromAxisBaseColor of axis value labels. Will use chart's color if not set.
dashLengthType
numberDefault0Inherited fromAxisBaseLength of a dash. 0 means line is not dashed.
fillAlphaType
numberDefault0Inherited fromAxisBaseFill 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
stringDefault#FFFFFFInherited fromAxisBaseFill color. Every second space between grid lines can be filled with color. Set fillAlpha to a value greater than 0 to see the fills.
fontSizeType
numberDefaultInherited fromAxisBaseSize of value labels text. Will use chart's fontSize if not set.
gridAlphaType
numberDefault0.2Inherited fromAxisBaseOpacity of grid lines.
gridColorType
stringDefault#000000Inherited fromAxisBaseColor of grid lines.
gridCountType
numberDefault5Inherited fromAxisBaseNumber 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
numberDefault1Inherited fromAxisBaseThickness of grid lines.
guidesType
arrayDefaultInherited fromAxisBaseThe array of guides belonging to this axis.
ignoreAxisWidthType
booleanDefaultfalseInherited fromAxisBaseIf 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
booleanDefaultfalseInherited fromAxisBaseSpecifies whether values should be placed inside or outside plot area.
labelFrequencyType
numberDefault1Inherited fromAxisBaseFrequency at which labels should be placed. Doesn't work for CategoryAxis if parseDates is set to true.
labelRotationType
numberDefault0Inherited fromAxisBaseRotation angle of a label. Only horizontal axis' values can be rotated. If you set this for vertical axis, the setting will be ignored.
labelsEnabledType
booleanDefaulttrueInherited fromAxisBaseSpecifies whether axis displays category axis' labels and value axis' values.
offsetType
numberDefault0Inherited fromAxisBaseThe distance of the axis to the plot area, in pixels. Negative values can also be used.
positionType
stringDefaultInherited fromAxisBasePossible values are: "top", "bottom", "left", "right". If axis is vertical, default position is "left". If axis is horizontal, default position is "bottom".
showFirstLabelType
booleanDefaulttrueInherited fromAxisBaseWhether to show first axis label or not.
showLastLabelType
booleanDefaulttrueInherited fromAxisBaseWhether to show last axis label or not.
tickLengthType
numberDefault5Inherited fromAxisBaseLength of the tick marks.
titleType
stringDefaultInherited fromAxisBaseTitle of the axis.
titleBoldType
booleanDefaulttrueInherited fromAxisBaseSpecifies if title should be bold or not.
titleColorType
stringDefaultInherited fromAxisBaseColor of axis title. Will use text color of chart if not set any.
titleFontSizeType
numberDefaultInherited fromAxisBaseFont size of axis title. Will use font size of chart plus two pixels if not set any.
Methods
addListener()Returns
Adds event listener to the object.
type - string like 'axisChanged' (should be listed in 'events' section of this class or classes which extend this class). handler - function which is called when event happens
coordinateToValue()Returns
Number, - value of coordinate.Returns value of the coordinate.
coordinate - y or x coordinate, in pixels.
getCoordinate()Returns
Number - coordinateReturns coordinate of the value in pixels.
value - Number
removeListener()Returns
Removes event listener from the object
synchronizeWithAxis()Returns
One value axis can be synchronized with another value axis. You should set synchronizationMultiplyer in order for this to work.
axis - instance of ValueAxis.
zoomToValues()Returns
XY Chart only. Zooms-in the axis to the provided values.
2 inherited items
Events
axisChangedParam { type:
"axisChanged", target:ValueAxis} &{type:"axisChanged", chart:AmChart}Dispatched when value axis min/max values are changed.
axisZoomedParam { type:
"axisZoomed", target:ValueAxis} &{type:"axisZoomed", startValue:startValue, endValue:endValue, chart:AmChart}XY chart only. Dispatched when axis is zoomed.
logarithmicAxisFailedParam { type:
"logarithmicAxisFailed", target:ValueAxis} &{type:"logarithmicAxisFailed", chart:AmChart}Dispatched when valueAxis is logarithmic and values equal or less then zero were found in data.