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:
Name | Type | Description |
---|---|---|
align | ScaleTitleAlign | Alignment of the scale label. |
color | String - IsColor | Color of scale label. |
display | boolean | false |
font | IsFont | Font of scale label. |
padding | Padding | The padding of title. See padding documentation for more details. |