Class Tee.Chart.Axis
Defines a scale from minimum to maximum, to transform series points into chart canvas pixels coordinates.
Defined in: <..\..\src\teechart.js>.
Constructor Attributes | Constructor Name and Description |
---|---|
Tee.Chart.Axis(chart, horizontal, otherSide)
|
Field Attributes | Field Name and Description |
---|---|
Visual properties to draw the axis line.
|
|
Properties to display grid lines at tick increments.
|
|
Properties to display tick lines at each increment, inside chart.
|
|
Properties to display axis labels at tick increments.
|
|
Properties to display small tick lines between ticks.
|
|
Properties to display tick lines at each increment.
|
|
Properties to display text that describes the axis.
|
Method Attributes | Method Name and Description |
---|---|
<inner> |
anySeriesHasLessThan(c, n)
|
calc(value)
|
|
<inner> |
calcIncrement(c, maxLabelSize)
|
calcMinMax(p1, p2)
|
|
calcSize(value)
|
|
<inner> |
calcWordWrap(f, s)
|
drawAxis()
|
|
drawLabel(value, r)
|
|
drawTicks(t, factor, mult)
|
|
fromPos(p)
|
|
fromSize(p)
|
|
minmaxLabelWidth(adjust)
|
|
<inner> |
nextStep(value)
|
rotatedWidth(l, w)
|
|
roundMin()
|
|
scroll(delta)
Changes the axis maximum and minimum values
|
|
setMinMax(min, max)
|
|
<inner> |
toRadians(angle)
|
<inner> |
truncFloat(n)
|
Class Detail
Tee.Chart.Axis(chart, horizontal, otherSide)
- Parameters:
- {Tee.Chart} chart
- The chart object this axis object belongs to.
- {Boolean} horizontal
- Determines if axis is horizontal or vertical.
- {Boolean} otherSide
- Determines if axis is at top/right or bottom/left side of chart.
Field Detail
{Tee.Format}
format
Visual properties to draw the axis line.
{Tee.Chart.Axis-Grid}
grid
Properties to display grid lines at tick increments.
{Tee.Chart.Axis-Ticks}
innerTicks
Properties to display tick lines at each increment, inside chart.
{Tee.Chart.Axis-Labels}
labels
Properties to display axis labels at tick increments.
{Tee.Chart.Axis-Ticks}
minorTicks
Properties to display small tick lines between ticks.
{Tee.Chart.Axis-Ticks}
ticks
Properties to display tick lines at each increment.
{Tee.Chart.Axis-Title}
title
Properties to display text that describes the axis.
Method Detail
<inner>
{Number}
anySeriesHasLessThan(c, n)
- Parameters:
- c
- n
- Returns:
- {Number} Returns if any visible series has less than n values. Only called from Axis calcIncrement, to avoid axis label increments to be smaller than series number of points.
{Number}
calc(value)
- Parameters:
- value
- Returns:
- {Number} Returns the position in pixels for a given value, using the axis scales.
calcAxisScale()
<inner>
{Number}
calcIncrement(c, maxLabelSize)
- Parameters:
- c
- maxLabelSize
- Returns:
- {Number} Returns the best appropiate distance between axis labels.
calcMinMax(p1, p2)
- Parameters:
- {Number} p1
- Position in pixels to be axis minimum.
- {Number} p2
- Position in pixels to be axis maximum.
calcScale()
{Number}
calcSize(value)
- Parameters:
- value
- Returns:
- {Number} Returns the size in pixels of a given value, using the axis scales.
<inner>
calcWordWrap(f, s)
- Parameters:
- f
- s
checkMinMax()
drawAxis()
drawGrids()
drawLabel(value, r)
- Parameters:
- value
- r
drawLabels()
drawTicks(t, factor, mult)
- Parameters:
- t
- factor
- mult
drawTitle()
{Number}
fromPos(p)
- Parameters:
- p
- Returns:
- {Number} Returns the axis value for a given position in pixels.
fromSize(p)
- Parameters:
- p
{Boolean}
hasAnySeries()
- Returns:
- {Boolean} Returns the first visible series associated to this axis, or null if any.
{Number}
minmaxLabelWidth(adjust)
- Parameters:
- adjust
- Returns:
- {Number} Returns the approximated width in pixels of largest axis label.
<inner>
{Number}
nextStep(value)
- Parameters:
- value
- Returns:
- {Number} Returns the next bigger value in the sequence 1,2,5,10,20,50...
rotatedWidth(l, w)
- Parameters:
- l
- w
{Number}
roundMin()
- Returns:
- {Number} Returns the axis minimum value rounded according the axis increment distance.
scroll(delta)
Changes the axis maximum and minimum values
- Parameters:
- {Number} delta
- The positive or negative amount to scroll.
setMinMax(min, max)
- Parameters:
- min
- max
<inner>
toRadians(angle)
- Parameters:
- angle
<inner>
truncFloat(n)
- Parameters:
- n