Skip to content

features axes

강지웅/FE개발팀/NE edited this page Feb 24, 2016 · 9 revisions

Axes Feature

  • This section introduces about feature of axes.

Setting about each title of axes

Using title options(yAxis.title, xAxis.title), you can set about each title of axes.

Example

//...
var options = {
    yAxis: {
        title: 'Y Axis Title'
    },
    xAxis: {
        title: 'X Axis Title'
    }
};
tui.chart.barChart(container, data, options);

Setting min, max at axis of value type

X axis is value type at only bar chart, but Y axis is value type at column, line, area, combo chart.

Setting min, max at X axis

Using xAxis.min, xAxis.max options, you can set about minimum or maximum value of X axis. These options are available only in the bar chart.

Example
//...
var options = {
    xAxis: {
        min: 0,
        max: 1000
    }
};
tui.chart.barChart(container, data, options);

Setting min, max at Y axis

Using yAxis.min, yAxis.max options, you can set about minimum or maximum value of Y axis. These options are available in the column , line, area , combo chart.

Example
//...
var options = {
    yAxis: {
        min: 0,
        max: 1000
    }
};
tui.chart.columnChart(container, data, options);

To display the axis label sparsely in the X axis?

If you set 'center' to series.align option, you can display a legend label to each center of a piece of the pie graph.

Using xAxis.labelInterval option, you can display the axis label sparsely. This option is available in the column , line, area , combo chart.

Example
//...
var options = {
    xAxis: {
        labelInterval: 2
    }
};
tui.chart.columnChart(container, data, options);
Clone this wiki locally