|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.moxieapps.gwt.highcharts.client.Configurable<AxisTitle> org.moxieapps.gwt.highcharts.client.AxisTitle
public class AxisTitle
A configurable class that can be used to represent custom title options for an
axis, which can then be set on a specific axis (via the Axis.setAxisTitle(AxisTitle)
method.)
Example usage:
chart.getXAxis().setAxisTitle(
new AxisTitle()
.setText("Sales by Month")
.setAlign(AxisTitle.Align.MIDDLE)
);
Nested Class Summary | |
---|---|
static class |
AxisTitle.Align
An enumeration of supported axis title alignment types, which can be passed to methods like setAlign(AxisTitle.Align) method. |
Constructor Summary | |
---|---|
AxisTitle()
|
Method Summary | |
---|---|
AxisTitle |
setAlign(AxisTitle.Align align)
Convenience method for setting the 'align' option of the title. |
AxisTitle |
setMargin(Number margin)
Convenience method for setting the 'margin' option of the title. |
AxisTitle |
setRotation(Number rotation)
Convenience method for setting the 'margin' option of the title. |
AxisTitle |
setStyle(Style style)
Convenience method for setting the 'style' options of the axis title. |
AxisTitle |
setText(String text)
Convenience method for setting the 'text' option of the title. |
AxisTitle |
setY(Number y)
Convenience method for setting the 'y' option of the title. |
Methods inherited from class org.moxieapps.gwt.highcharts.client.Configurable |
---|
getOptions, setOption |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AxisTitle()
Method Detail |
---|
public AxisTitle setAlign(AxisTitle.Align align)
axisTitle.setOption("align", AxisTitle.Align.LOW);
Alignment of the title relative to the axis values. Possible values are "low", "middle" or "high".
Defaults to AxisTitle.Align.MIDDLE
.
align
- The alignment of the title relative to the axis values.
AxisTitle
instance for convenient method chaining.public AxisTitle setMargin(Number margin)
axisTitle.setOption("margin", 60);
The pixel distance between the axis labels or line and the title. Defaults
to 0 for horizontal axis, 10 for vertical axis.
margin
- The pixel distance between the axis labels or line and the title.
AxisTitle
instance for convenient method chaining.public AxisTitle setRotation(Number rotation)
axisTitle.setOption("margin", 60);
The rotation of the text in degrees. 0 is horizontal, 270 is vertical reading
from bottom to top. Defaults to 0.
rotation
- The rotation of the text in degrees.
AxisTitle
instance for convenient method chaining.public AxisTitle setStyle(Style style)
axisTitle.setOption("/style/fontWeight", "bold");
axisTitle.setOption("/style/fontFamily", "serif");
etc.
CSS styles for the title. When titles are rotated they are rendered using vector graphic techniques
and not all styles are applicable. Most noteworthy, a bug in IE8 renders all rotated strings bold
and italic. Defaults to:
style
- CSS styles for the axis title.
AxisTitle
instance for convenient method chaining.public AxisTitle setText(String text)
axisTitle.setOption("text", "Sales by Month");
The actual text of the axis title. It can contain basic HTML text markup
like <b>, <i> and spans with style. Defaults to null.
Note to disable an axis title from being displayed completely, simply set the text
to "null". (This can also be accomplished more simply by just setting the title
text to null directly on the axis via the Axis.setAxisTitleText(String)
method.)
text
- The actual text of the axis title.
AxisTitle
instance for convenient method chaining.public AxisTitle setY(Number y)
axisTitle.setOption("y", 25);
y
- The number of pixels that the y-axis will be offset
AxisTitle
instance for convenient method chaining.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |