Class XYSeriesRenderer

java.lang.Object
com.codename1.charts.renderers.SimpleSeriesRenderer
com.codename1.charts.renderers.XYSeriesRenderer

public class XYSeriesRenderer extends SimpleSeriesRenderer
A renderer for the XY type series.
  • Constructor Details

    • XYSeriesRenderer

      public XYSeriesRenderer()
  • Method Details

    • isFillBelowLine

      @Deprecated public boolean isFillBelowLine()
      Deprecated.

      Returns if the chart should be filled below the line.

      Returns

      the fill below line status

      Deprecated

      Use #getFillOutsideLine() instead.

    • setFillBelowLine

      @Deprecated public void setFillBelowLine(boolean fill)
      Deprecated.

      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: the fill below line flag value
      Deprecated

      Use #addFillOutsideLine(FillOutsideLine) instead.

    • 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: 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: the points fill flag value
    • setFillBelowLineColor

      @Deprecated public void setFillBelowLineColor(int color)
      Deprecated.

      Sets the fill below the line color.

      Parameters
      • color: the fill below line color
      Deprecated

      Use FillOutsideLine.setColor instead

    • getPointStyle

      public PointStyle getPointStyle()

      Returns the point style.

      Returns

      the point style

    • setPointStyle

      public void setPointStyle(PointStyle style)

      Sets the point style.

      Parameters
      • style: 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: 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: 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: 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: 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: 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.

      Parameters
      • font
    • 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: 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: @param spacing 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: 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.

      Parameters
      • font
    • 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: 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: the annotations color