|
||||||||||
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<T> org.moxieapps.gwt.highcharts.client.labels.Labels<T>
public abstract class Labels<T extends Labels>
Represents the common base class for all label configuration option types, which allows
for general options to be set via the inherited Configurable.setOption(String, Object)
method. But also exposes type specific methods that the caller is encouraged to use instead,
such as setAlign(org.moxieapps.gwt.highcharts.client.labels.Labels.Align)
, setColor(String)
, etc.
XAxisLabels
, YAxisLabels
,
or DataLabels
.
Nested Class Summary | |
---|---|
static class |
Labels.Align
An enumeration of supported label alignment types, which can be passed to methods like setAlign(org.moxieapps.gwt.highcharts.client.labels.Labels.Align) method. |
static class |
Labels.VerticalAlign
|
Constructor Summary | |
---|---|
Labels()
|
Method Summary | |
---|---|
T |
setAlign(Labels.Align align)
Convenience method for setting the 'align' option for the labels. |
T |
setColor(String color)
Convenience method for setting the 'color' option for the data labels. |
T |
setEnabled(boolean enabled)
Convenience method for setting the 'enabled' option for the data labels. |
T |
setRotation(Number rotation)
Convenience method for setting the 'rotation' option for the labels. |
T |
setStyle(Style style)
Convenience method for setting the 'style' options of the labels. |
T |
setVerticalAlign(Labels.VerticalAlign verticalAlign)
Convenience method for setting the 'verticalAlign' option for the labels. |
T |
setX(Number x)
Convenience method for setting the 'x' position option of the label. |
T |
setY(Number y)
Convenience method for setting the 'y' position option of the label. |
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 Labels()
Method Detail |
---|
public T setAlign(Labels.Align align)
labels.setOption("align", Labels.Align.CENTER);
The alignment of the data label compared to the point. Can be one of "left", "center" or "right". Defaults to "center".
align
- The alignment of the label compared to the point.
Labels
instance for convenient method chaining.public T setColor(String color)
labels.setOption("color", "#CC0000");
The text color for the data labels. Defaults to null.
color
- The text color to use for the labels.
Labels
instance for convenient method chaining.public T setEnabled(boolean enabled)
labels.setOption("enabled", true);
Enable or disable the data labels. Defaults to false.
enabled
- Whether or not to enable or disable the data labels.
Labels
instance for convenient method chaining.public T setRotation(Number rotation)
labels.setOption("rotation", 90.0f);
Text rotation in degrees. Defaults to 0.
rotation
- Text rotation in degrees.
Labels
instance for convenient method chaining.public T setStyle(Style style)
labels.setOption("/style/fontWeight", "bold");
labels.setOption("/style/fontFamily", "serif");
etc.
CSS styles for the labels. Defaults to:
style
- CSS styles for the labels.
Labels
instance for convenient method chaining.public T setVerticalAlign(Labels.VerticalAlign verticalAlign)
labels.setOption("verticalAlign", Labels.VerticalAlign.TOP);
The vertical alignment of the data label compared to the point. Can be one of "top", "middle" or "bottom". Defaults to "center".
verticalAlign
- The vertical alignment of the label compared to the point.
Labels
instance for convenient method chaining.public T setX(Number x)
labels.setOption("x", 70);
The x position offset of the label relative to the point. Defaults to 0 for series data labels,
-8 y-axis labels, and 0 x-axis labels.
x
- The x position of the title, relative to the chart's spacing.
Labels
instance for convenient method chaining.public T setY(Number y)
labels.setOption("y", -20);
The y position offset of the label relative to the point. Defaults to -6 for series data labels,
3 for y-axis labels, and 0 for x-axis labels.
y
- The y position of the title, relative to the chart's spacing.
Labels
instance for convenient method chaining.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |