public class XYSeriesRenderer

  1. Object
  2. SimpleSeriesRenderer
  3. XYSeriesRenderer
A renderer for the XY type series.

Nested types

class XYSeriesRenderer.FillOutsideLineA descriptor for the line fill behavior.

Constructors

public XYSeriesRenderer()

Methods

public boolean isFillBelowLine()Deprecated Returns if the chart should be filled below the line.
public void setFillBelowLine(boolean fill)Deprecated Sets if the line chart should be filled below its line.
public XYSeriesRenderer.FillOutsideLine[] getFillOutsideLine()Returns the type of the outside fill of the line.
public void addFillOutsideLine(XYSeriesRenderer.FillOutsideLine fill)Sets if the line chart should be filled outside its line.
public boolean isFillPoints()Returns if the chart points should be filled.
public void setFillPoints(boolean fill)Sets if the chart points should be filled.
public void setFillBelowLineColor(int color)Deprecated Sets the fill below the line color.
public PointStyle getPointStyle()Returns the point style.
public void setPointStyle(PointStyle style)Sets the point style.
public float getPointStrokeWidth()Returns the point stroke width in pixels.
public void setPointStrokeWidth(float strokeWidth)Sets the point stroke width in pixels.
public float getLineWidth()Returns the chart line width.
public void setLineWidth(float lineWidth)Sets the chart line width.
public boolean isDisplayChartValues()Returns if the chart point values should be displayed as text.
public void setDisplayChartValues(boolean display)Sets if the chart point values should be displayed as text.
public int getDisplayChartValuesDistance()Returns the chart values minimum distance.
public void setDisplayChartValuesDistance(int distance)Sets chart values minimum distance.
public float getChartValuesTextSize()Returns the chart values text size.
public void setChartValuesTextSize(float textSize)Sets the chart values text size.
public void setChartValuesTextFont(Font font)Sets the chart values title text font size using a Font object instead of a point size.
public int getChartValuesTextAlign()Returns the chart values text align.
public void setChartValuesTextAlign(int align)Sets the chart values text align.
public float getChartValuesSpacing()Returns the chart values spacing from the data point.
public void setChartValuesSpacing(float spacing)Sets the chart values spacing from the data point.
public float getAnnotationsTextSize()Returns the annotations text size.
public void setAnnotationsTextSize(float textSize)Sets the annotations text size.
public void setAnnotationsTextFont(Font font)Sets the annotations text font size using a Font object instead of a point size.
public int getAnnotationsTextAlign()Returns the annotations text align.
public void setAnnotationsTextAlign(int align)Sets the annotations text align.
public int getAnnotationsColor()Returns the annotations color.
public void setAnnotationsColor(int color)Sets the annotations color.

Inherited methods

Constructor details

XYSeriesRenderer

public XYSeriesRenderer()

Method details

isFillBelowLine

public boolean isFillBelowLine()
Deprecated. Use #getFillOutsideLine() instead.
Returns if the chart should be filled below the line.

Returns

the fill below line status

setFillBelowLine

public void setFillBelowLine(boolean fill)
Deprecated. Use #addFillOutsideLine(FillOutsideLine) instead.
Sets if the line chart should be filled below its line. Filling below the line transforms a line chart into an area chart.

Parameters

fill boolean
the fill below line flag value

getFillOutsideLine

public XYSeriesRenderer.FillOutsideLine[] getFillOutsideLine()
Returns the type of the outside fill of the line.

Returns

the type of the outside fill of the line.

addFillOutsideLine

public void addFillOutsideLine(XYSeriesRenderer.FillOutsideLine fill)
Sets if the line chart should be filled outside its line. Filling outside with FillOutsideLine.INTEGRAL the line transforms a line chart into an area chart.

Parameters

fill XYSeriesRenderer.FillOutsideLine
the type of the filling

isFillPoints

public boolean isFillPoints()
Returns if the chart points should be filled.

Returns

the points fill status

setFillPoints

public void setFillPoints(boolean fill)
Sets if the chart points should be filled.

Parameters

fill boolean
the points fill flag value

setFillBelowLineColor

public void setFillBelowLineColor(int color)
Deprecated. Use FillOutsideLine.setColor instead
Sets the fill below the line color.

Parameters

color int
the fill below line color

getPointStyle

public PointStyle getPointStyle()
Returns the point style.

Returns

the point style

setPointStyle

public void setPointStyle(PointStyle style)
Sets the point style.

Parameters

style PointStyle
the point style

getPointStrokeWidth

public float getPointStrokeWidth()
Returns the point stroke width in pixels.

Returns

the point stroke width in pixels

setPointStrokeWidth

public void setPointStrokeWidth(float strokeWidth)
Sets the point stroke width in pixels.

Parameters

strokeWidth float
the point stroke width in pixels

getLineWidth

public float getLineWidth()
Returns the chart line width.

Returns

the line width

setLineWidth

public void setLineWidth(float lineWidth)
Sets the chart line width.

Parameters

lineWidth float
the line width

isDisplayChartValues

public boolean isDisplayChartValues()
Returns if the chart point values should be displayed as text.

Returns

if the chart point values should be displayed as text

setDisplayChartValues

public void setDisplayChartValues(boolean display)
Sets if the chart point values should be displayed as text.

Parameters

display boolean
if the chart point values should be displayed as text

getDisplayChartValuesDistance

public int getDisplayChartValuesDistance()
Returns the chart values minimum distance.

Returns

the chart values minimum distance

setDisplayChartValuesDistance

public void setDisplayChartValuesDistance(int distance)
Sets chart values minimum distance.

Parameters

distance int
the chart values minimum distance

getChartValuesTextSize

public float getChartValuesTextSize()
Returns the chart values text size.

Returns

the chart values text size

setChartValuesTextSize

public void setChartValuesTextSize(float textSize)
Sets the chart values text size. Consider using #setChartValuesTextFont(com.codename1.ui.Font) instead to allow the font size to to be adjusted appropriately for the display resolution.

Parameters

textSize float
the chart values text size

setChartValuesTextFont

public void setChartValuesTextFont(Font font)

Sets the chart values 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 #setChartValuesTextSize(float) to set the text size in pixels.

getChartValuesTextAlign

public int getChartValuesTextAlign()
Returns the chart values text align.

Returns

the chart values text align

setChartValuesTextAlign

public void setChartValuesTextAlign(int align)
Sets the chart values text align.

Parameters

align int
the chart values text align

getChartValuesSpacing

public float getChartValuesSpacing()
Returns the chart values spacing from the data point.

Returns

the chart values spacing

setChartValuesSpacing

public void setChartValuesSpacing(float spacing)
Sets the chart values spacing from the data point.

Parameters

spacing float
the chart values spacing (in pixels) from the chart data point

getAnnotationsTextSize

public float getAnnotationsTextSize()
Returns the annotations text size.

Returns

the annotations text size

setAnnotationsTextSize

public void setAnnotationsTextSize(float textSize)
Sets the annotations text size. Consider using #setAnnotationsTextFont(com.codename1.ui.Font) instead to allow the font size to to be adjusted appropriately for the display resolution.

Parameters

textSize float
the annotations text size

setAnnotationsTextFont

public void setAnnotationsTextFont(Font font)

Sets the annotations 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 #setAnnotationsTextSize(float) to set the text size in pixels.

getAnnotationsTextAlign

public int getAnnotationsTextAlign()
Returns the annotations text align.

Returns

the annotations text align

setAnnotationsTextAlign

public void setAnnotationsTextAlign(int align)
Sets the annotations text align.

Parameters

align int
the chart values text align

getAnnotationsColor

public int getAnnotationsColor()
Returns the annotations color.

Returns

the annotations color

setAnnotationsColor

public void setAnnotationsColor(int color)
Sets the annotations color.

Parameters

color int
the annotations color