public class XAxisLabels extends Labels<XAxisLabels>
XAxis.setLabels(org.moxieapps.gwt.highcharts.client.labels.XAxisLabels)
method. Example usage:
chart.getXAxis().setLabels(
new XAxisLabels()
.setAlign(Labels.Align.LEFT)
.setColor("#CC0000")
);
Labels.Align, Labels.VerticalAlign| Constructor and Description |
|---|
XAxisLabels() |
| Modifier and Type | Method and Description |
|---|---|
AxisLabelsFormatter |
getFormatter()
Returns the custom axis labels formatter that has been applied to the x-axis, or null if the
built-in generic formatter is being used instead.
|
XAxisLabels |
setFormatter(AxisLabelsFormatter axisLabelsFormatter)
Sets a custom formatter for the labels on the axis that can be used to control how the text of the
labels will be displayed.
|
XAxisLabels |
setStaggerLines(Number staggerLines)
Convenience method for setting the 'staggerLines' option for the labels.
|
XAxisLabels |
setStep(Number step)
Convenience method for setting the 'step' option for the labels.
|
setAlign, setColor, setEnabled, setRotation, setStyle, setVerticalAlign, setX, setYgetOptions, setOptionpublic XAxisLabels setFormatter(AxisLabelsFormatter axisLabelsFormatter)
AxisLabelsFormatter interface, and
in particular the AxisLabelsFormatter.format(AxisLabelsData) method for more details on
the capabilities available to custom formatters.axisLabelsFormatter - The custom formatter to use for the labels (if not given a built-in
generic formatter is used which simply returns the value as a string).XAxisLabels instance for convenient method chaining.public AxisLabelsFormatter getFormatter()
public XAxisLabels setStaggerLines(Number staggerLines)
xAxisLabels.setOption("staggerLines", 2);
Horizontal axes only. The number of lines to spread the labels over to make room or tighter labels. Defaults to null.staggerLines - The number of lines to spread the labels over to make room or tighter labels.XAxisLabels instance for convenient method chaining.public XAxisLabels setStep(Number step)
xAxisLabels.setOption("step", 2);
To show only every n'th label on the axis, set the step to n. E.g. - setting the step to
2 shows every other label. Defaults to null.step - o show only every n'th label on the axis, set the step to n.XAxisLabels instance for convenient method chaining.Copyright © 2015. All Rights Reserved.