org.moxieapps.gwt.highcharts.client.labels
Class YAxisLabels
java.lang.Object
org.moxieapps.gwt.highcharts.client.Configurable<T>
org.moxieapps.gwt.highcharts.client.labels.Labels<YAxisLabels>
org.moxieapps.gwt.highcharts.client.labels.YAxisLabels
public class YAxisLabels
- extends Labels<YAxisLabels>
Represents the configuration options that can be set for the labels on the x-axis of a chart, and
can then be passed to the YAxis.setLabels(org.moxieapps.gwt.highcharts.client.labels.YAxisLabels)
method. Example usage:
chart.getYAxis().setLabels(
new YAxisLabels()
.setAlign(Labels.Align.LEFT)
.setColor("#CC0000")
);
- Since:
- 1.0.0
- Author:
- squinn@moxiegroup.com (Shawn Quinn)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
YAxisLabels
public YAxisLabels()
setFormatter
public YAxisLabels 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. See the
AxisLabelsFormatter
interface, and
in particular the AxisLabelsFormatter.format(AxisLabelsData)
method for more details on
the capabilities available to custom formatters.
- Parameters:
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).
- Returns:
- A reference to this
YAxisLabels
instance for convenient method chaining.
getFormatter
public AxisLabelsFormatter getFormatter()
- Returns the custom axis labels formatter that has been applied to the y-axis, or null if the
built-in generic formatter is being used instead.
- Returns:
- The custom axis labels formatter that has been applied to the y-axis, or null if it has not been set.
setStep
public YAxisLabels setStep(Number step)
- Convenience method for setting the 'step' option for the labels. Equivalent to:
yAxisLabels.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.
- Parameters:
step
- o show only every n'th label on the axis, set the step to n.
- Returns:
- A reference to this
YAxisLabels
instance for convenient method chaining.
Copyright © 2015. All Rights Reserved.