Options
All
  • Public
  • Public/Protected
  • All
Menu

Specifies properties of an axis. It is an object literal in which all properties are optional.

since

2013.0

Hierarchy

  • AxisConfiguration

Overview

Properties

Optional axisLineStyle

axisLineStyle: LineStyle

The line style of the axis.

Optional gridLine

gridLine: boolean

Indicates whether a measuring tick should be extended as a grid line over the map. The default is false.

Optional labelFormatter

labelFormatter: (value: number) => string

A formatter function. It must map a single numerical value to a string.

var axisConfiguration = {
   labelFormatter: function(n){
     return n.toString();
   }
};

Type declaration

    • (value: number): string
    • Parameters

      • value: number

      Returns string

Optional labelRotation

labelRotation: number

The rotation of the label in degrees. The rotation point is the anchor point of the label. You can specify the anchor point of the label using the labelStyle property of this configuration object. Describe the horizontal component of the anchor point with the textAnchor property and the vertical component with the alignmentBaseline property. The rotation is clockwise.

Optional labelStyle

labelStyle: TextStyle

The style of the labels. A label will be drawn at each measuring tick. The default anchor point of the label is in the middle for the X-axis (alignmentBaseline='top' and textAnchor='center'), and at the end for the Y-axis (alignmentBaseline='middle' and textAnchor='end').

Optional spacing

spacing: { mapSpacing: number[]; minimumTickSpacing: number }

A configuration object indicating how ticks should be spaced alongside the axis. It is an object literal consisting of 2 properties.

  • {Number} minimumTickSpacing: the minimum amount of pixels that should be present between two measuring ticks. Note that this is an approximate. The actual amount of pixels between two measuring ticks may vary according to the current scale of the map and to the mapSpacing parameter
  • {Array} mapSpacing: an array of allowed distances, expressed in the unit of measure of the axis. Depending on the value of minimumTickSpacing the most appropriate value will be selected.

 //the ticks will be spaced at least 200 pixels apart on the screen.
 //The spacing in map coordinates will be one of the allowed values in the array.
 //Note that both values specify only approximately how far measuring ticks will be apart.
 //If no match can be made that satisfies both constraints, the closest map spacing possible will be used.

 var axisConfiguration = {
   spacing: {
     minimumTickSpacing: 200,
     mapSpacing: [1,5,10,50,100,500,1000,5000,10000,50000,100000,500000,1000000,5000000,10000000]
   }
 };

Type declaration

  • mapSpacing: number[]
  • minimumTickSpacing: number

Optional subTickLength

subTickLength: number

The size of the sub ticks.

Optional subTicks

subTicks: number

The number of smaller ticks in between the main measuring ticks. These are not labeled.

Optional tickLength

tickLength: number

The size of the measuring tick drawn on the axis

Optional tickLineStyle

tickLineStyle: LineStyle

The line style of the axis ticks (at each measuring tick). This line style will also be applied to the grid lines, which can be turned on by configuring the gridLine property.

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method