Name
axis —
an axis for a chart
Description
![[Warning]](images/warning.png) |
Warning |
| This component is of Beta quality and is subject to change. |
A abstract class that represents one of the axes of a rectangular chart. In general, axis isn't instantiated directly
Details
Properties (31)
-
adjustmin
-
<attribute name="adjustmin" value="false" />
-
axisEnabled
-
<attribute name="axisEnabled" type="boolean" value="true" />
public var axisEnabled : boolean;
enable or disable the axis
-
categoricalArray
-
<attribute name="categoricalArray" value="null" />
private var categoricalArray;
-
columnName
-
<attribute name="columnName" type="string" />
public var columnName : String;
Indicates the column name associated to the axis
-
dataSeries
-
<attribute name="dataSeries" value="[]" />
-
fixedRange
-
<attribute name="fixedRange" type="boolean" value="false" />
public var fixedRange : boolean;
Fix the range of the axis to the maximum & minimum
-
interval
-
<attribute name="interval" value="5" />
Indicates the interval of values between the tic marks of the axis
-
labelArray
-
<attribute name="labelArray" value="[]" />
-
labelReposEnabled
-
<attribute name="labelReposEnabled" type="boolean" value="true" />
public var labelReposEnabled : boolean;
Attribute that controls if the labels are vertically repositioned to avoid overlaping
-
labelrotation
-
<attribute name="labelrotation" type="string" value="horizontal" />
public var labelrotation : String;
Indicates the axis title rotation can be 'horizontal' or 'vertical'
-
labelTextArray
-
<attribute name="labelTextArray" value="[]" />
private var labelTextArray;
Exposes distances where tickmarks are drawn
-
majorInterval
-
<attribute name="majorInterval" type="number" value="5" />
public var majorInterval : Number;
Allows to customize the interval of the Major Tics Marks
-
majorTickEnabled
-
<attribute name="majorTickEnabled" type="boolean" value="true" />
public var majorTickEnabled : boolean;
-
maximum
-
<attribute name="maximum" value="100" />
Numerical value that indicates the Maximum value in the axis can be positive or negative value
-
maximumRender
-
<attribute name="maximumRender" type="number" value="0" />
private var maximumRender : Number;
-
minimum
-
<attribute name="minimum" value="0" />
Numerical value that indicates the Minimum value in the axis can be positive or negative value
-
minimumRender
-
<attribute name="minimumRender" type="number" value="0" />
private var minimumRender : Number;
-
minorTickEnabled
-
<attribute name="minorTickEnabled" type="boolean" value="false" />
public var minorTickEnabled : boolean;
-
offset
-
<attribute name="offset" type="number" value="0" />
private var offset : Number;
-
ratioPixel
-
<attribute name="ratioPixel" type="number" />
private var ratioPixel : Number;
-
scale
-
<attribute name="scale" type="number" value="1" />
private var scale : Number;
-
ticklabelcolumn
-
<attribute name="ticklabelcolumn" type="string" value="$once{''}" />
public var ticklabelcolumn : String;
Data Column that is used to override the values of Tic Marks labels
-
tickmarkLabelMaxDecimals
-
<attribute name="tickmarkLabelMaxDecimals" type="number" value="2" />
private var tickmarkLabelMaxDecimals : Number;
-
tickMarkPositions
-
<attribute name="tickMarkPositions" value="[]" />
private var tickMarkPositions;
Exposes distances where tickmarks are drawn
-
tickMarksLabelsEnabled
-
<attribute name="tickMarksLabelsEnabled" type="boolean" value="true" />
public var tickMarksLabelsEnabled : boolean;
enable the rendering of tic Marks labels
-
title
-
<attribute name="title" type="string" />
public var title : String;
-
titleGap
-
<attribute name="titleGap" type="number" value="10" />
private var titleGap : Number;
-
titleLocation
-
<attribute name="titleLocation" type="string" value="default" />
public var titleLocation : String;
Indicates the placement of the Axis title possible values: 'low','high','default'
-
titleX
-
<attribute name="titleX" type="number" value="null" />
public var titleX : Number;
Indicates the placement in X position of the Axis title
-
titleY
-
<attribute name="titleY" type="number" value="null" />
public var titleY : Number;
Indicates the placement in Y position of the Axis title
-
type
-
<attribute name="type" type="string" />
public var type : String;
Indicates the axis type can be 'linear' or 'categorical'
Methods (29)
-
adjustMinimum()
-
<method name="adjustMinimum" />
private function adjustMinimum();
Adjust the minimum value to cero if attribute is true
-
calculateAutomaticInterval()
-
<method name="calculateAutomaticInterval" args="pRange" />
private function calculateAutomaticInterval(pRange : Number);
Calculate an adecuate range to have 5-10 tickmarks
-
clear()
-
private function clear();
-
findOutsideBorder()
-
<method name="findOutsideBorder" args="pNum, pInt, pMinMax" />
private function findOutsideBorder(pNum : Number, pInt : Number, pMinMax : Boolean);
Find the outside border value using the interval
-
getAxisLength()
-
<method name="getAxisLength" />
private function getAxisLength();
Get the length of the axis.
-
getPixelDistance()
-
<method name="getPixelDistance" args="pInput" />
private function getPixelDistance(pInput);
Method to return a pixel position given graph data
-
getTickMarkPositions()
-
<method name="getTickMarkPositions" />
private function getTickMarkPositions();
Returns the distances for where tickmarks will be drawn
-
init()
-
-
processData()
-
<method name="processData" args="pLabel" />
public function processData(pLabel);
Method for extensible label rendering
-
render()
-
public function render();
Render method render Axis Title, Axis lines, Tic Marks and TickMarks labels
-
renderAxis()
-
<method name="renderAxis" />
private function renderAxis();
-
renderCategoricalTick()
-
<method name="renderCategoricalTick" />
private function renderCategoricalTick();
Render categorical tick marks
-
renderCycle()
-
<method name="renderCycle" args="pTickyoff" />
private function renderCycle(pTickyoff);
Actually render tickmarks and tickmark labels
-
renderLinearTick()
-
<method name="renderLinearTick" />
private function renderLinearTick();
-
renderTick()
-
<method name="renderTick" />
private function renderTick();
-
renderTickMark()
-
<method name="renderTickMark" args="pOffset, pPos, pStyle" />
private function renderTickMark(pOffset, pPos, pStyle);
-
renderTickMarkLabel()
-
<method name="renderTickMarkLabel" args="pLabel, pPos, pOffset, pI" />
private function renderTickMarkLabel(pLabel, pPos, pOffset, pI);
-
renderTitle()
-
<method name="renderTitle" />
private function renderTitle();
-
reposLabels()
-
<method name="reposLabels" args="pMarks" />
private function reposLabels(pMarks);
Check label location and change placement to avoid labels
overlaping
-
setAutomaticMinMaxRender()
-
<method name="setAutomaticMinMaxRender" args="pMin, pMax" />
private function setAutomaticMinMaxRender(pMin, pMax);
Calculate automatic outside borders
-
setAxisTitleAttributes()
-
<method name="setAxisTitleAttributes" />
private function setAxisTitleAttributes();
-
setDataSeries()
-
<method name="setDataSeries" args="dataseries" />
private function setDataSeries(dataseries : expression);
-
setLabelPos()
-
<method name="setLabelPos" args="pLabel, pOffset, pTW, pTH, pPos" />
private function setLabelPos(pLabel, pOffset, pTW, pTH, pPos);
-
setNewMinMaxRenderer()
-
<method name="setNewMinMaxRenderer" args="pNewMin, pNewMax" />
private function setNewMinMaxRenderer(pNewMin, pNewMax);
Allow to set the minimumRender and the maximumRender attributes manually
-
setPlotArea()
-
<method name="setPlotArea" args="plotarea" />
private function setPlotArea(plotarea);
-
setScaleAndOffset()
-
<method name="setScaleAndOffset" />
private function setScaleAndOffset();
setter for scale and offset
-
setupDelegate()
-
<method name="setupDelegate" />
private function setupDelegate();
-
trunDec()
-
<method name="trunDec" args="pNum, pDec" />
private function trunDec(pNum : Number, pDec : Number);
-
useLabelColumns()
-
<method name="useLabelColumns" />
private function useLabelColumns();
This method replaces the array labels with an array from a Data Column
LZX Synopsis
<class name="
lz.axis" extends="
lz.drawview
">
<attribute name="
adjustmin
" value="
false" />
<attribute name="
axisEnabled
" type="
boolean" value="
true" />
<attribute name="
fixedRange
" type="
boolean" value="
false" />
<attribute name="
interval
" value="
5" />
<attribute name="
labelrotation
" type="
string" value="
horizontal" />
<attribute name="
maximum
" value="
100" />
<attribute name="
minimum
" value="
0" />
<attribute name="
offset
" type="
number" value="
0" />
<attribute name="
scale
" type="
number" value="
1" />
<attribute name="
title
" type="
string" />
<attribute name="
titleGap
" type="
number" value="
10" />
<attribute name="
titleLocation
" type="
string" value="
default" />
<attribute name="
titleX
" type="
number" value="
null" />
<attribute name="
titleY
" type="
number" value="
null" />
<attribute name="
type
" type="
string" />
<method name="
clear
" />
<method name="
setLabelPos
" args="
pLabel,
pOffset,
pTW,
pTH,
pPos" />
<method name="
trunDec
" args="
pNum,
pDec" />
</class>
JavaScript Synopsis
public
lz.axis extends
lz.drawview
{
private var
scale
:
Number;
public var
title
:
String;
public var
type
:
String;
prototype private function
clear
();
prototype private function
findOutsideBorder
(
pNum : Number,
pInt : Number,
pMinMax : Boolean);
prototype private function
init
();
prototype public function
render
();
prototype private function
setDataSeries
(
dataseries : expression);
prototype private function
setLabelPos
(
pLabel,
pOffset,
pTW,
pTH,
pPos);
prototype private function
trunDec
(
pNum : Number,
pDec : Number);
}