M
- the data type that the axis usespublic class NumericAxis<M> extends CartesianAxis<M,Number>
Modifier and Type | Field and Description |
---|---|
protected boolean |
adjustMaximumByMajorUnit |
protected boolean |
adjustMinimumByMajorUnit |
protected double |
interval |
protected double |
maximum |
protected double |
minimum |
protected double |
step |
protected int |
stepsMax |
minorTickSteps, position, ticks
axisConfig, bbox, chart, displayGrid, from, hidden, labelConfig, labelNames, labelProvider, labels, lastIndex, lines, steps, titleConfig, titleSprite, to, toolTip, toolTipConfig, x, y
Constructor and Description |
---|
NumericAxis()
Creates a numeric axis.
|
Modifier and Type | Method and Description |
---|---|
void |
addField(ValueProvider<? super M,? extends Number> field)
Adds a
ValueProvider to provide data to a field of the axis. |
protected void |
applyData()
Applies the field data to the labels of the axis.
|
void |
calcEnds()
Calculate the start, end and step points.
|
protected void |
createLabels()
Creates the list of labels to display.
|
List<ValueProvider<? super M,? extends Number>> |
getFields() |
double |
getInterval()
Returns the manually set interval between tick marks.
|
double |
getMaximum()
Returns the maximum value of the axis.
|
double |
getMinimum()
Returns the minimum value of the axis.
|
int |
getSteps()
Returns the steps of the axis.
|
boolean |
isAdjustMaximumByMajorUnit()
Returns true if the axis adjusts the minimum.
|
boolean |
isAdjustMinimumByMajorUnit()
Returns true if the axis adjusts the maximum.
|
void |
removeField(ValueProvider<? super M,? extends Number> field) |
void |
setAdjustMaximumByMajorUnit(boolean adjustMaximumByMajorUnit)
Sets true if the axis adjusts the maximum.
|
void |
setAdjustMinimumByMajorUnit(boolean adjustMinimumByMajorUnit)
Sets true if the axis adjusts the minimum.
|
void |
setFields(List<ValueProvider<? super M,? extends Number>> fields) |
void |
setInterval(double interval)
Sets the interval between tick marks.
|
void |
setMaximum(double maximum)
Sets the maximum value of the axis.
|
void |
setMinimum(double minimum)
Sets the minimum value of the axis.
|
void |
setSteps(int steps)
Sets the number of steps on the axis.
|
clear, drawAxis, drawLabels, getDashSize, getDepth, getGridDefaultConfig, getGridEvenConfig, getGridOddConfig, getHeight, getLabelStepRatio, getLabelTolerance, getLength, getMinorTickSteps, getPosition, getTextLabelPadding, getWidth, isLabelOverlapHiding, setDashSize, setDepth, setGridDefaultConfig, setGridEvenConfig, setGridOddConfig, setHeight, setLabelOverlapHiding, setLabelPadding, setLabelStepRatio, setLabelTolerance, setLength, setMinorTickSteps, setPosition, setWidth
addAxisHandler, addAxisItemOutHandler, addAxisItemOverHandler, addAxisItemUpHandler, addAxisSelectionHandler, ensureHandlers, getAxisConfig, getBBox, getChart, getFrom, getLabelConfig, getLabelProvider, getTitleConfig, getTo, getX, getY, isDisplayGrid, isHidden, onMouseDown, onMouseMove, onMouseOut, onMouseUp, removeToolTip, setAxisConfig, setChart, setDisplayGrid, setHidden, setLabelConfig, setLabelProvider, setTitleConfig, setToolTipConfig, setX, setY
protected double minimum
protected double maximum
protected boolean adjustMaximumByMajorUnit
protected boolean adjustMinimumByMajorUnit
protected double step
protected int stepsMax
protected double interval
public void addField(ValueProvider<? super M,? extends Number> field)
ValueProvider
to provide data to a field of the axis.field
- the value providerpublic void calcEnds()
public List<ValueProvider<? super M,? extends Number>> getFields()
public double getInterval()
public double getMaximum()
public double getMinimum()
public int getSteps()
public boolean isAdjustMaximumByMajorUnit()
public boolean isAdjustMinimumByMajorUnit()
public void removeField(ValueProvider<? super M,? extends Number> field)
public void setAdjustMaximumByMajorUnit(boolean adjustMaximumByMajorUnit)
adjustMaximumByMajorUnit
- true if the axis adjusts the maximumpublic void setAdjustMinimumByMajorUnit(boolean adjustMinimumByMajorUnit)
adjustMinimumByMajorUnit
- true if the axis adjusts the minimumpublic void setFields(List<ValueProvider<? super M,? extends Number>> fields)
public void setInterval(double interval)
interval
- the interval between tick markspublic void setMaximum(double maximum)
maximum
- the maximum value of the axis, or NaN to unset this propertypublic void setMinimum(double minimum)
minimum
- the minimum value of the axis, or NaN to unset this propertypublic void setSteps(int steps)
steps
- the number of steps on the axisprotected void applyData()
CartesianAxis
applyData
in class CartesianAxis<M,Number>
protected void createLabels()
CartesianAxis
createLabels
in class CartesianAxis<M,Number>
Copyright © 2018. All rights reserved.