Skip to main content
Version: 6.1

Axis Title

When creating a chart, you want to tell the viewer what data they are viewing. To do this, you need to label the axis.

caution

The scale title can be ONLY applied to cartesian axes.

The axis title provides all set and get methods to manage the configuration, as following:

// creates an axis
CartesianLinearAxis axis = new CartesianLinearAxis(chart);
// enables the title
axis.getTitle().setDisplay(true);
// sets and gets color of title
axis.getTitle().setColor(HtmlColor.RED);

IsColor color = axis.getTitle().getColor();

The following are the attributes that you can set:

NameTypeDescription
alignScaleTitleAlignAlignment of the scale label.
colorString - IsColorColor of scale label.
displaybooleanfalse
fontIsFontFont of scale label.
paddingPaddingThe padding of title.
See padding documentation for more details.