|
||||||||||
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<ChartSubtitle> org.moxieapps.gwt.highcharts.client.ChartSubtitle
public class ChartSubtitle
A configurable class that can be used to represent custom sub title options for the
chart, which can then be set on the chart (via the BaseChart.setChartSubtitle(ChartSubtitle)
method.)
Example usage:
chart.setChartSubTitle(
new ChartSubtitle()
.setText("Source: Wikipedia")
.setAlign(ChartTitle.Align.MIDDLE)
);
Constructor Summary | |
---|---|
ChartSubtitle()
|
Method Summary | |
---|---|
ChartSubtitle |
setAlign(ChartTitle.Align align)
Convenience method for setting the 'align' option of the subtitle. |
ChartSubtitle |
setFloating(boolean floating)
Convenience method for setting the 'floating' option of the subtitle. |
ChartSubtitle |
setStyle(Style style)
Convenience method for setting the 'style' options of the subtitle. |
ChartSubtitle |
setText(String text)
Convenience method for setting the 'text' option of the subtitle. |
ChartSubtitle |
setVerticalAlign(ChartTitle.VerticalAlign verticalAlign)
Convenience method for setting the 'verticalAlign' option of the subtitle. |
ChartSubtitle |
setX(Number x)
Convenience method for setting the 'x' position option of the subtitle. |
ChartSubtitle |
setY(Number y)
Convenience method for setting the 'y' position option of the subtitle. |
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 ChartSubtitle()
Method Detail |
---|
public ChartSubtitle setAlign(ChartTitle.Align align)
chartSubtitle.setOption("align", chartSubtitle.Align.LEFT);
The horizontal alignment of the subtitle. Can be one of "left", "center" and "right".
Defaults to ChartTitle.Align.CENTER
.
align
- The horizontal alignment of the subtitle.
ChartSubtitle
instance for convenient method chaining.public ChartSubtitle setFloating(boolean floating)
chartSubtitle.setOption("floating", true);
When the subtitle is floating, the plot area will not move to make space for it. Defaults to false.
floating
- 'true' to float the subtitle above the plot area, or 'false' (the default) to make space for it.
ChartSubtitle
instance for convenient method chaining.public ChartSubtitle setStyle(Style style)
chartSubtitle.setOption("/style/fontWeight", "bold");
chartSubtitle.setOption("/style/fontFamily", "serif");
etc.
CSS styles for the subtitle. Exact positioning of the title can be achieved by changing the
margin property, or by adding position: "absolute" and left and top properties. Defaults to:
style
- CSS styles for the subtitle.
ChartSubtitle
instance for convenient method chaining.public ChartSubtitle setText(String text)
chartSubtitle.setOption("text", "Sales by Month");
The actual text of the axis subtitle. It can contain basic HTML text markup
like <b>, <i> and spans with style. Defaults to null.
Note to disable an axis subtitle from being displayed completely, simply set the text
to "null". (This can also be accomplished more simply by just setting the subtitle
text to null directly on the axis via the Axis.setAxisTitleText(String)
method.)
text
- The actual text of the axis subtitle.
ChartSubtitle
instance for convenient method chaining.public ChartSubtitle setVerticalAlign(ChartTitle.VerticalAlign verticalAlign)
chartSubtitle.setOption("verticalAlign", chartSubtitle.VerticalAlign.BOTTOM);
The vertical alignment of the subtitle. Can be one of "top", "middle" and "bottom". Defaults to "top".
Defaults to ChartTitle.VerticalAlign.TOP
.
verticalAlign
- The vertical alignment of the subtitle.
ChartSubtitle
instance for convenient method chaining.public ChartSubtitle setX(Number x)
chartSubtitle.setOption("x", 70);
The x position of the subtitle relative to the alignment within the spacing set on the chart
controlled via BaseChart.setSpacingLeft(Number)
and BaseChart.setSpacingRight(Number)
.
Defaults to 0.
x
- The x position of the subtitle, relative to the chart's spacing.
ChartSubtitle
instance for convenient method chaining.public ChartSubtitle setY(Number y)
chartSubtitle.setOption("y", -20);
The y position of the subtitle relative to the alignment within the spacing set on the chart
controlled via BaseChart.setSpacingTop(Number)
and BaseChart.setSpacingBottom(Number)
.
Defaults to 25.
y
- The y position of the subtitle, relative to the chart's spacing.
ChartSubtitle
instance for convenient method chaining.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |