Constructor
new Axis(chart, horizontal, otherSide)
Parameters:
Name | Type | Description |
---|---|---|
chart |
Tee.Chart | The chart object this axis object belongs to. |
horizontal |
Boolean | Determines if axis is horizontal or vertical. |
otherSide |
Boolean | Determines if axis is at top/right or bottom/left side of chart. |
Properties:
Name | Type | Description |
---|---|---|
format |
Tee.Format | Visual properties to draw the axis line. |
labels |
Tee.Chart.Axis-Labels | Properties to display axis labels at tick increments. |
grid |
Tee.Chart.Axis-Grid | Properties to display grid lines at tick increments. |
ticks |
Tee.Chart.Axis-Ticks | Properties to display tick lines at each increment. |
innerTicks |
Tee.Chart.Axis-Ticks | Properties to display tick lines at each increment, inside chart. |
minorTicks |
Tee.Chart.Axis-Ticks | Properties to display small tick lines between ticks. |
title |
Tee.Chart.Axis-Title | Properties to display text that describes the axis. |
- Source:
Classes
Methods
(static) calcRect()
Axis rect calcs. Returns current ChartRect.
- Source:
calc() → {Number}
- Source:
Returns:
Returns the position in pixels for a given value, using the axis scales.
- Type
- Number
calcMinMax(p1, p2)
Parameters:
Name | Type | Description |
---|---|---|
p1 |
Number | Position in pixels to be axis minimum. |
p2 |
Number | Position in pixels to be axis maximum. |
- Source:
calcSize() → {Number}
- Source:
Returns:
Returns the size in pixels of a given value, using the axis scales.
- Type
- Number
fromPos() → {Number}
- Source:
Returns:
Returns the axis value for a given position in pixels.
- Type
- Number
hasAnySeries() → {Boolean}
- Source:
Returns:
Returns the first visible series associated to this axis, or null if any.
- Type
- Boolean
minmaxLabelWidth() → {Number}
- Source:
Returns:
Returns the approximated width in pixels of largest axis label.
- Type
- Number
roundMin() → {Number}
- Source:
Returns:
Returns the axis minimum value rounded according the axis increment distance.
- Type
- Number
scroll(delta)
Changes the axis maximum and minimum values
Parameters:
Name | Type | Description |
---|---|---|
delta |
Number | The positive or negative amount to scroll. |
- Source:
(inner) anySeriesHasLessThan() → {Number}
- Source:
Returns:
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.
- Type
- Number
(inner) calcIncrement() → {Number}
- Source:
Returns:
Returns the best appropiate distance between axis labels.
- Type
- Number
(inner) nextStep() → {Number}
- Source:
Returns:
Returns the next bigger value in the sequence 1,2,5,10,20,50...
- Type
- Number