Name

axis — an axis for a chart

Synopsis

LZX: axis
JavaScript: lz.axis
Type: Class
Access: public
Topic: Charting And Graphing.Common
Declared in: lps/components/charts/common/axis.lzx

Description

[Warning] 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

Superclass Chain

node (LzNode) » view (LzView) » drawview » axis

Known Subclasses

Details

Properties (31)

adjustmin
<attribute name="adjustmin" value="false" />
private var adjustmin;
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="[]" />
private var dataSeries;
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" />
public var interval;
Indicates the interval of values between the tic marks of the axis
labelArray
<attribute name="labelArray" value="[]" />
private var labelArray;
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;
enable Major Tics Marks
maximum
<attribute name="maximum" value="100" />
public var maximum;
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" />
public var minimum;
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;
enable minor Tics Marks
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;
Axis title label
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()
<method name="clear" />
private function clear();
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()
<method name="init" />
private function init();
Init method
processData()
<method name="processData" args="pLabel" />
public function processData(pLabel);
Method for extensible label rendering
render()
<method name="render" />
public function render();
Render method render Axis Title, Axis lines, Tic Marks and TickMarks labels
renderAxis()
<method name="renderAxis" />
private function renderAxis();
Render axis
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();
Render linear ticks
renderTick()
<method name="renderTick" />
private function renderTick();
Render ticks
renderTickMark()
<method name="renderTickMark" args="pOffset, pPos, pStyle" />
private function renderTickMark(pOffset, pPos, pStyle);
Render a tick mark
renderTickMarkLabel()
<method name="renderTickMarkLabel" args="pLabel, pPos, pOffset, pI" />
private function renderTickMarkLabel(pLabel, pPos, pOffset, pI);
Render a tickmark label
renderTitle()
<method name="renderTitle" />
private function renderTitle();
Render axis title
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();
setAxisTitleAttributes
setDataSeries()
<method name="setDataSeries" args="dataseries" />
private function setDataSeries(dataseries : expression);
setter for data series
setLabelPos()
<method name="setLabelPos" args="pLabel, pOffset, pTW, pTH, pPos" />
private function setLabelPos(pLabel, pOffset, pTW, pTH, pPos);
Set label position
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);
setter for plot area
setScaleAndOffset()
<method name="setScaleAndOffset" />
private function setScaleAndOffset();
setter for scale and offset
setupDelegate()
<method name="setupDelegate" />
private function setupDelegate();
setupDelegate
trunDec()
<method name="trunDec" args="pNum, pDec" />
private function trunDec(pNum : Number, pDec : Number);
Truncate decimals
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=" categoricalArray " value="null" />
  <attribute name=" columnName " type="string" />
  <attribute name=" dataSeries " value="[]" />
  <attribute name=" fixedRange " type="boolean" value="false" />
  <attribute name=" interval " value="5" />
  <attribute name=" labelArray " value="[]" />
  <attribute name=" labelReposEnabled " type="boolean" value="true" />
  <attribute name=" labelrotation " type="string" value="horizontal" />
  <attribute name=" labelTextArray " value="[]" />
  <attribute name=" majorInterval " type="number" value="5" />
  <attribute name=" majorTickEnabled " type="boolean" value="true" />
  <attribute name=" maximum " value="100" />
  <attribute name=" maximumRender " type="number" value="0" />
  <attribute name=" minimum " value="0" />
  <attribute name=" minimumRender " type="number" value="0" />
  <attribute name=" minorTickEnabled " type="boolean" value="false" />
  <attribute name=" offset " type="number" value="0" />
  <attribute name=" ratioPixel " type="number" />
  <attribute name=" scale " type="number" value="1" />
  <attribute name=" ticklabelcolumn " type="string" value="$once{''}" />
  <attribute name=" tickmarkLabelMaxDecimals " type="number" value="2" />
  <attribute name=" tickMarkPositions " value="[]" />
  <attribute name=" tickMarksLabelsEnabled " type="boolean" value="true" />
  <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=" adjustMinimum " />
  <method name=" calculateAutomaticInterval " args="pRange" />
  <method name=" clear " />
  <method name=" findOutsideBorder " args="pNum, pInt, pMinMax" />
  <method name=" getAxisLength " />
  <method name=" getPixelDistance " args="pInput" />
  <method name=" getTickMarkPositions " />
  <method name=" init " />
  <method name=" processData " args="pLabel" />
  <method name=" render " />
  <method name=" renderAxis " />
  <method name=" renderCategoricalTick " />
  <method name=" renderCycle " args="pTickyoff" />
  <method name=" renderLinearTick " />
  <method name=" renderTick " />
  <method name=" renderTickMark " args="pOffset, pPos, pStyle" />
  <method name=" renderTickMarkLabel " args="pLabel, pPos, pOffset, pI" />
  <method name=" renderTitle " />
  <method name=" reposLabels " args="pMarks" />
  <method name=" setAutomaticMinMaxRender " args="pMin, pMax" />
  <method name=" setAxisTitleAttributes " />
  <method name=" setDataSeries " args="dataseries" />
  <method name=" setLabelPos " args="pLabel, pOffset, pTW, pTH, pPos" />
  <method name=" setNewMinMaxRenderer " args="pNewMin, pNewMax" />
  <method name=" setPlotArea " args="plotarea" />
  <method name=" setScaleAndOffset " />
  <method name=" setupDelegate " />
  <method name=" trunDec " args="pNum, pDec" />
  <method name=" useLabelColumns " />
</class>

JavaScript Synopsis

public lz.axis extends  lz.drawview  {
  private var adjustmin ;
  public var axisEnabled  : boolean;
  private var categoricalArray ;
  public var columnName  : String;
  private var dataSeries ;
  public var fixedRange  : boolean;
  public var interval ;
  private var labelArray ;
  public var labelReposEnabled  : boolean;
  public var labelrotation  : String;
  private var labelTextArray ;
  public var majorInterval  : Number;
  public var majorTickEnabled  : boolean;
  public var maximum ;
  private var maximumRender  : Number;
  public var minimum ;
  private var minimumRender  : Number;
  public var minorTickEnabled  : boolean;
  private var offset  : Number;
  private var ratioPixel  : Number;
  private var scale  : Number;
  public var ticklabelcolumn  : String;
  private var tickmarkLabelMaxDecimals  : Number;
  private var tickMarkPositions ;
  public var tickMarksLabelsEnabled  : boolean;
  public var title  : String;
  private var titleGap  : Number;
  public var titleLocation  : String;
  public var titleX  : Number;
  public var titleY  : Number;
  public var type  : String;
  prototype private function adjustMinimum ();
  prototype private function calculateAutomaticInterval (pRange : Number);
  prototype private function clear ();
  prototype private function findOutsideBorder (pNum : Number, pInt : Number, pMinMax : Boolean);
  prototype private function getAxisLength ();
  prototype private function getPixelDistance (pInput);
  prototype private function getTickMarkPositions ();
  prototype private function init ();
  prototype public function processData (pLabel);
  prototype public function render ();
  prototype private function renderAxis ();
  prototype private function renderCategoricalTick ();
  prototype private function renderCycle (pTickyoff);
  prototype private function renderLinearTick ();
  prototype private function renderTick ();
  prototype private function renderTickMark (pOffset, pPos, pStyle);
  prototype private function renderTickMarkLabel (pLabel, pPos, pOffset, pI);
  prototype private function renderTitle ();
  prototype private function reposLabels (pMarks);
  prototype private function setAutomaticMinMaxRender (pMin, pMax);
  prototype private function setAxisTitleAttributes ();
  prototype private function setDataSeries (dataseries : expression);
  prototype private function setLabelPos (pLabel, pOffset, pTW, pTH, pPos);
  prototype private function setNewMinMaxRenderer (pNewMin, pNewMax);
  prototype private function setPlotArea (plotarea);
  prototype private function setScaleAndOffset ();
  prototype private function setupDelegate ();
  prototype private function trunDec (pNum : Number, pDec : Number);
  prototype private function useLabelColumns ();
}