Sencha Documentation

Defines axis for charts. The axis position, type, style can be configured. The axes are defined in an axes array of configuration objects where the type, field, grid and other configuration options can be set. To know more about how to create a Chart please check the Chart class documentation. Here's an example for the axes part: An example of axis for a series (in this case for an area chart that has multiple layers of yFields) could be:
axes: [{
        type: 'Numeric',
        grid: true,
        position: 'left',
        fields: ['data1', 'data2', 'data3'],
        title: 'Number of Hits',
        grid: {
            odd: {
                opacity: 1,
                fill: '#ddd',
                stroke: '#bbb',
                'stroke-width': 1
            }
        },
        minimum: 0,
        adjustMinimumByMajorUnit: 0
    }, {
        type: 'Category',
        position: 'bottom',
        fields: ['name'],
        title: 'Month of the Year',
        grid: true,
        label: {
            rotate: {
                degrees: 315
            }
        }
    }]
In this case we use a `Numeric` axis for displaying the values of the Area series and a `Category` axis for displaying the names of the store elements. The numeric axis is placed on the left of the screen, while the category axis is placed at the bottom of the chart. Both the category and numeric axes have `grid` set, which means that horizontal and vertical lines will cover the chart background. In the category axis the labels will be rotated so they can fit the space better.

Config Options

 
dashSize : Number
The size of the dash marker. Default's 3.
The size of the dash marker. Default's 3.
 
length : Number
Offset axis position. Default's 0.
Offset axis position. Default's 0.
 
position : String
Where to set the axis. Available options are `left`, `bottom`, `right`, `top`. Default's `bottom`.
Where to set the axis. Available options are `left`, `bottom`, `right`, `top`. Default's `bottom`.
 
width : Number
Offset axis width. Default's 0.
Offset axis width. Default's 0.

Methods

 
drawAxis : Void
Renders the axis into the screen and updates it's position.
Renders the axis into the screen and updates it's position.
 
drawGrid : Void
Renders an horizontal and/or vertical grid into the Surface.
Renders an horizontal and/or vertical grid into the Surface.
 
drawLabels : Void
Renders the labels in the axes.
Renders the labels in the axes.