Class: Axis

.Chart. Axis

Defines a scale from minimum to maximum, to transform series points into chart canvas pixels coordinates.

new Axis

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:
  • ../../src/teechart.js, line 2327

Classes

Grid
Labels
Ticks
Title

Methods

calc

Source:
  • ../../src/teechart.js, line 3218
Returns:
Returns the position in pixels for a given value, using the axis scales.
Type
Number

calcMinMax

Parameters:
Name Type Description
p1 Number Position in pixels to be axis minimum.
p2 Number Position in pixels to be axis maximum.
Source:
  • ../../src/teechart.js, line 3262

calcSize

Source:
  • ../../src/teechart.js, line 3254
Returns:
Returns the size in pixels of a given value, using the axis scales.
Type
Number

fromPos

Source:
  • ../../src/teechart.js, line 3241
Returns:
Returns the axis value for a given position in pixels.
Type
Number

hasAnySeries

Source:
  • ../../src/teechart.js, line 2795
Returns:
Returns the first visible series associated to this axis, or null if any.
Type
Boolean

minmaxLabelWidth

Source:
  • ../../src/teechart.js, line 2641
Returns:
Returns the approximated width in pixels of largest axis label.
Type
Number

roundMin

Source:
  • ../../src/teechart.js, line 2973
Returns:
Returns the axis minimum value rounded according the axis increment distance.
Type
Number

scroll

Changes the axis maximum and minimum values

Parameters:
Name Type Description
delta Number The positive or negative amount to scroll.
Source:
  • ../../src/teechart.js, line 2498

<inner> anySeriesHasLessThan

Source:
  • ../../src/teechart.js, line 2718
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

Source:
  • ../../src/teechart.js, line 2754
Returns:
Returns the best appropiate distance between axis labels.
Type
Number

<inner> nextStep

Source:
  • ../../src/teechart.js, line 2741
Returns:
Returns the next bigger value in the sequence 1,2,5,10,20,50...
Type
Number