public class XYMultipleSeriesRenderer
- Object
- DefaultRenderer
- XYMultipleSeriesRenderer
Nested types
enum XYMultipleSeriesRenderer.Orientation | An enum for the XY chart orientation of the X axis. |
Constructors
public XYMultipleSeriesRenderer() | |
public XYMultipleSeriesRenderer(int scaleNumber) |
Methods
Inherited fields
Inherited methods
From DefaultRenderer
getChartTitle, setChartTitle, getChartTitleTextSize, setChartTitleTextSize, setChartTitleTextFont, addSeriesRenderer, addSeriesRenderer, removeSeriesRenderer, removeAllRenderers, getSeriesRendererAt, getSeriesRendererCount, getSeriesRenderers, getBackgroundColor, setBackgroundColor, isApplyBackgroundColor, setApplyBackgroundColor, getAxesColor, setAxesColor, getYAxisColor, setYAxisColor, getXAxisColor, setXAxisColor, getLabelsColor, setLabelsColor, getLabelsTextSize, setLabelsTextSize, setLabelsTextFont, isShowAxes, setShowAxes, isShowLabels, setShowLabels, isShowTickMarks, setShowTickMarks, isShowGridX, setShowGridX, isShowGridY, setShowGridY, setShowGrid, isShowCustomTextGridX, setShowCustomTextGridX, isShowCustomTextGridY, setShowCustomTextGridY, setShowCustomTextGrid, isShowLegend, setShowLegend, isFitLegend, setFitLegend, getTextTypefaceName, getTextTypefaceStyle, getTextTypeface, setTextTypeface, getLegendTextSize, setLegendTextSize, setLegendTextFont, setTextTypeface, isAntialiasing, setAntialiasing, getScale, setScale, getOriginalScale, setZoomEnabled, isZoomButtonsVisible, setZoomButtonsVisible, isExternalZoomEnabled, setExternalZoomEnabled, getZoomRate, setZoomRate, isClickEnabled, setClickEnabled, getSelectableBuffer, setSelectableBuffer, getLegendHeight, setLegendHeight, getMargins, setMargins, isInScroll, setInScroll, getStartAngle, setStartAngle, isDisplayValues, setDisplayValues
Constructor details
XYMultipleSeriesRenderer
public XYMultipleSeriesRenderer()XYMultipleSeriesRenderer
public XYMultipleSeriesRenderer(int scaleNumber)Method details
initAxesRange
public void initAxesRange(int scales)initAxesRangeForScale
public void initAxesRangeForScale(int i)getOrientation
public XYMultipleSeriesRenderer.Orientation getOrientation()Returns
setOrientation
public void setOrientation(XYMultipleSeriesRenderer.Orientation orientation)Parameters
orientationXYMultipleSeriesRenderer.Orientation- the chart orientation
getXTitle
public String getXTitle()Returns
setXTitle
public void setXTitle(String title)Parameters
titleString- the X axis title
getYTitle
public String getYTitle()Returns
setYTitle
public void setYTitle(String title)Parameters
titleString- the Y axis title
getYTitle
public String getYTitle(int scale)Parameters
scaleint- the renderer scale
Returns
setYTitle
public void setYTitle(String title, int scale)Parameters
titleString- the Y axis title
scaleint- the renderer scale
getAxisTitleTextSize
public float getAxisTitleTextSize()Returns
setAxisTitleTextSize
public void setAxisTitleTextSize(float textSize)#setAxisTitleTextFont(com.codename1.ui.Font)
instead to allow the font size to to be adjusted appropriately for the display
resolution.Parameters
textSizefloat- the chart axis text size
setAxisTitleTextFont
public void setAxisTitleTextFont(Font font)Sets the Axis title text font size using a Font object instead of a point size. This method is the preferred way to set font size because it allows you to more easily have fonts appear in an appropriate size for the target device.
Alternatively check out #setAxisTitleTextSize(float) to set the text
size in pixels.
getXAxisMin
public double getXAxisMin()Returns
setXAxisMin
public void setXAxisMin(double min)Parameters
mindouble- the X axis range start value
isMinXSet
public boolean isMinXSet()Returns
getXAxisMax
public double getXAxisMax()Returns
setXAxisMax
public void setXAxisMax(double max)Parameters
maxdouble- the X axis range end value
isMaxXSet
public boolean isMaxXSet()Returns
getYAxisMin
public double getYAxisMin()Returns
setYAxisMin
public void setYAxisMin(double min)Parameters
mindouble- the Y axis range start value
isMinYSet
public boolean isMinYSet()Returns
getYAxisMax
public double getYAxisMax()Returns
setYAxisMax
public void setYAxisMax(double max)Parameters
maxdouble- the Y axis range end value
isMaxYSet
public boolean isMaxYSet()Returns
getXAxisMin
public double getXAxisMin(int scale)Parameters
scaleint- the renderer scale
Returns
setXAxisMin
public void setXAxisMin(double min, int scale)Parameters
mindouble- the X axis range start value
scaleint- the renderer scale
isMinXSet
public boolean isMinXSet(int scale)Parameters
scaleint- the renderer scale
Returns
getXAxisMax
public double getXAxisMax(int scale)Parameters
scaleint- the renderer scale
Returns
setXAxisMax
public void setXAxisMax(double max, int scale)Parameters
maxdouble- the X axis range end value
scaleint- the renderer scale
isMaxXSet
public boolean isMaxXSet(int scale)Parameters
scaleint- the renderer scale
Returns
getYAxisMin
public double getYAxisMin(int scale)Parameters
scaleint- the renderer scale
Returns
setYAxisMin
public void setYAxisMin(double min, int scale)Parameters
mindouble- the Y axis range start value
scaleint- the renderer scale
isMinYSet
public boolean isMinYSet(int scale)Parameters
scaleint- the renderer scale
Returns
getYAxisMax
public double getYAxisMax(int scale)Parameters
scaleint- the renderer scale
Returns
setYAxisMax
public void setYAxisMax(double max, int scale)Parameters
maxdouble- the Y axis range end value
scaleint- the renderer scale
isMaxYSet
public boolean isMaxYSet(int scale)Parameters
scaleint- the renderer scale
Returns
getXLabels
public int getXLabels()Returns
setXLabels
public void setXLabels(int xLabels)Parameters
xLabelsint- the approximate number of labels for the X axis
addTextLabel
public void addTextLabel(double x, String text)Parameters
xdouble- the X axis value
textString- the text label
addXTextLabel
public synchronized void addXTextLabel(double x, String text)Parameters
xdouble- the X axis value
textString- the text label
removeXTextLabel
public synchronized void removeXTextLabel(double x)Parameters
xdouble- the X axis value
getXTextLabel
public synchronized String getXTextLabel(Double x)Parameters
xDouble- the X axis value
Returns
getXTextLabelLocations
public synchronized Double[] getXTextLabelLocations()Returns
clearTextLabels
public void clearTextLabels()clearXTextLabels
public synchronized void clearXTextLabels()isXRoundedLabels
public boolean isXRoundedLabels()Returns
setXRoundedLabels
public void setXRoundedLabels(boolean rounded)Parameters
roundedboolean- rounded values to be used
addYTextLabel
public void addYTextLabel(double y, String text)Parameters
ydouble- the Y axis value
textString- the text label
removeYTextLabel
public void removeYTextLabel(double y)Parameters
ydouble- the Y axis value
addYTextLabel
public synchronized void addYTextLabel(double y, String text, int scale)Parameters
ydouble- the Y axis value
textString- the text label
scaleint- the renderer scale
removeYTextLabel
public synchronized void removeYTextLabel(double y, int scale)Parameters
ydouble- the Y axis value
scaleint- the renderer scale
getYTextLabel
public String getYTextLabel(Double y)Parameters
yDouble- the Y axis value
Returns
getYTextLabel
public synchronized String getYTextLabel(Double y, int scale)Parameters
yDouble- the Y axis value
scaleint- the renderer scale
Returns
getYTextLabelLocations
public Double[] getYTextLabelLocations()Returns
getYTextLabelLocations
public synchronized Double[] getYTextLabelLocations(int scale)Parameters
scaleint- the renderer scale
Returns
clearYTextLabels
public void clearYTextLabels()clearYTextLabels
public synchronized void clearYTextLabels(int scale)Parameters
scaleint- the renderer scale
getYLabels
public int getYLabels()Returns
setYLabels
public void setYLabels(int yLabels)Parameters
yLabelsint- the approximate number of labels for the Y axis
getBarWidth
public float getBarWidth()Returns
setBarWidth
public void setBarWidth(float width)Parameters
widthfloat- width in pixels
isPanEnabled
public boolean isPanEnabled()Returns
setPanEnabled
public void setPanEnabled(boolean enabled)DefaultRenderer#setPanEnabled(boolean) so it can be
delegated to boolean).Parameters
enabledboolean- pan enabled
isPanXEnabled
public boolean isPanXEnabled()Returns
isPanYEnabled
public boolean isPanYEnabled()Returns
setPanEnabled
public void setPanEnabled(boolean enabledX, boolean enabledY)Parameters
enabledXboolean- pan enabled on X axis
enabledYboolean- pan enabled on Y axis
isZoomEnabled
public boolean isZoomEnabled()Returns
isZoomXEnabled
public boolean isZoomXEnabled()Returns
isZoomYEnabled
public boolean isZoomYEnabled()Returns
setZoomEnabled
public void setZoomEnabled(boolean enabledX, boolean enabledY)Parameters
enabledXboolean- zoom enabled on X axis
enabledYboolean- zoom enabled on Y axis
getBarsSpacing
public double getBarsSpacing()Returns
getBarSpacing
public double getBarSpacing()Returns
setBarSpacing
public void setBarSpacing(double spacing)Parameters
spacingdouble- the spacing between bars coefficient
getMarginsColor
public int getMarginsColor()Returns
setMarginsColor
public void setMarginsColor(int color)Parameters
colorint- the margins color
getGridColor
public int getGridColor(int scale)Parameters
scaleint- the renderer index
Returns
setGridColor
public void setGridColor(int color)Parameters
colorint- the grid color
setGridColor
public void setGridColor(int color, int scale)Parameters
colorint- the grid color
scaleint- the renderer scale
getPanLimits
public double[] getPanLimits()Returns
setPanLimits
public void setPanLimits(double[] panLimits)Parameters
panLimitsdouble[]- the pan limits
getZoomLimits
public double[] getZoomLimits()Returns the zoom limits as a 4-element array, or null if there are no limits applied.
Array elements are:
0 : Minimum distance between X-Axis min and max values. Same as
#getZoomInLimitX()1 : Maximum distance between X-Axis min and max values.
2 : Minimum distance between Y-Axis min and max values. Same as
#getZoomInLimitY()3 : Maximum distance between Y-Axis min and max values.
Returns
setZoomLimits
public void setZoomLimits(double[] zoomLimits)Sets the zoom limits as an array of 4 values.
Array elements are:
0 : Minimum distance between X-Axis min and max values. Same as
#getZoomInLimitX()1 : Maximum distance between X-Axis min and max values.
2 : Minimum distance between Y-Axis min and max values. Same as
#getZoomInLimitY()3 : Maximum distance between Y-Axis min and max values.
Setting this value as null will turn off all limits so that, if zoom is enabled, users can zoom and and out as much as they like.
Parameters
zoomLimitsdouble[]- the zoom limits
getXLabelsAngle
public float getXLabelsAngle()Returns
setXLabelsAngle
public void setXLabelsAngle(float angle)Parameters
anglefloat- the rotation angle of labels for the X axis
getYLabelsAngle
public float getYLabelsAngle()Returns
setYLabelsAngle
public void setYLabelsAngle(float angle)Parameters
anglefloat- the rotation angle of labels for the Y axis
getPointSize
public float getPointSize()Returns
setPointSize
public void setPointSize(float size)Parameters
sizefloat- the point size
setRange
public void setRange(double[] range)Parameters
rangedouble[]- an array having the values in this order: minX, maxX, minY, maxY
setRange
public void setRange(double[] range, int scale)Parameters
rangedouble[]- an array having the values in this order: minX, maxX, minY, maxY
scaleint- the renderer scale
isInitialRangeSet
public boolean isInitialRangeSet()isInitialRangeSet
public boolean isInitialRangeSet(int scale)Parameters
scaleint- the renderer scale
Returns
getInitialRange
public double[] getInitialRange()Returns
setInitialRange
public void setInitialRange(double[] range)Parameters
rangedouble[]- an array having the values in this order: minX, maxX, minY, maxY
getInitialRange
public double[] getInitialRange(int scale)Parameters
scaleint- the renderer scale
Returns
setInitialRange
public void setInitialRange(double[] range, int scale)Parameters
rangedouble[]- an array having the values in this order: minX, maxX, minY, maxY
scaleint- the renderer scale
getXLabelsColor
public int getXLabelsColor()Returns
setXLabelsColor
public void setXLabelsColor(int color)Parameters
colorint- the X axis labels color
getYLabelsColor
public int getYLabelsColor(int scale)Returns
setYLabelsColor
public void setYLabelsColor(int scale, int color)Parameters
scaleint- the renderer scale
colorint- the Y axis labels color
getXLabelsAlign
public int getXLabelsAlign()Returns
setXLabelsAlign
public void setXLabelsAlign(int align)Parameters
alignint- the X labels alignment
getYLabelsAlign
public int getYLabelsAlign(int scale)Parameters
scaleint- the renderer scale
Returns
setYLabelsAlign
public void setYLabelsAlign(int align)getYAxisAlign
public int getYAxisAlign(int scale)setYAxisAlign
public void setYAxisAlign(int align, int scale)setYLabelsAlign
public void setYLabelsAlign(int align, int scale)Parameters
alignint- the Y labels alignment
scaleint- Not documented.
getXLabelsPadding
public float getXLabelsPadding()Returns
setXLabelsPadding
public void setXLabelsPadding(float padding)Parameters
paddingfloat- the amount of padding between the axis and the label
getYLabelsPadding
public float getYLabelsPadding()Returns
setYLabelsPadding
public void setYLabelsPadding(float padding)Parameters
paddingfloat- the amount of padding between the axis and the label
getYLabelsVerticalPadding
public float getYLabelsVerticalPadding()Returns
setYLabelsVerticalPadding
public void setYLabelsVerticalPadding(float padding)Parameters
paddingfloat- the amount of vertical padding
getLabelFormat
public NumberFormat getLabelFormat()Returns
getXLabelFormat
public NumberFormat getXLabelFormat()Returns
setXLabelFormat
public void setXLabelFormat(NumberFormat format)Parameters
formatNumberFormat- the number format for X axis labels
getYLabelFormat
public NumberFormat getYLabelFormat(int scale)Parameters
scaleint- the renderer scale
Returns
setYLabelFormat
public void setYLabelFormat(NumberFormat format, int scale)Parameters
formatNumberFormat- the number format for labels
scaleint- the renderer scale
getZoomInLimitX
public double getZoomInLimitX()#getXAxisMin() and #getXAxisMax().Returns
See also
setZoomInLimitX
public void setZoomInLimitX(double zoomInLimitX)Sets the zoom in limit permitted in the axis X.
This function prevent that the distance between #getXAxisMin() and
#getXAxisMax() can’t be greater or equal than
#getZoomInLimitX()
Parameters
zoomInLimitXdouble- the maximum distance permitted between
#getXAxisMin()and#getXAxisMax().
getZoomInLimitY
public double getZoomInLimitY()#getYAxisMin() and #getYAxisMax().Returns
See also
setZoomInLimitY
public void setZoomInLimitY(double zoomInLimitY)Sets zoom in limit permitted in the axis Y.
This function prevent that the distance between #getYAxisMin() and
#getYAxisMax() can’t be greater or equal than
#getZoomInLimitY()
Parameters
zoomInLimitYdouble- the maximum distance permitted between
#getYAxisMin()and#getYAxisMax()
getScalesCount
public int getScalesCount()