Interface Chart

All Superinterfaces:
Serializable
All Known Subinterfaces:
Figure
All Known Implementing Classes:
ChartImpl, FigureImpl, FigureWidget, ScatterPlotMatrix

public interface Chart extends Serializable
Represents a graph. Contains Axes objects.
  • Method Details

    • chartRemoveSeries

      Chart chartRemoveSeries(String... removeSeriesNames)
      Removes the series with the specified names from this Chart.
      Parameters:
      removeSeriesNames - series names
      Returns:
      this Chart
    • chartTitle

      Chart chartTitle(String title)
      Sets the title of this Chart.
      Parameters:
      title - title
      Returns:
      this Chart
    • chartTitle

      default Chart chartTitle(Table t, String... titleColumns)
      Sets the title of this Chart.
      Parameters:
      t - table
      titleColumns - columns to include in the chart title
      Returns:
      this Chart with the title set to display comma-separated values from the table
    • chartTitle

      default Chart chartTitle(boolean showColumnNamesInTitle, Table t, String... titleColumns)
      Sets the title of this Chart.
      Parameters:
      showColumnNamesInTitle - Whether to show column names in title. If this is true, the title format will include the column name before the comma separated values; otherwise only the comma separated values will be included.
      t - table
      titleColumns - columns to include in the chart title
      Returns:
      this Chart with the title set to display comma-separated values from the table
    • chartTitle

      Chart chartTitle(String titleFormat, Table t, String... titleColumns)
      Sets the title of this Chart.
      Parameters:
      titleFormat - a MessageFormat format string for the chart title
      t - table
      titleColumns - columns to include in the chart title
      Returns:
      this Chart with the title set to display values from the table
    • chartTitle

      default Chart chartTitle(SelectableDataSet sds, String... titleColumns)
      Sets the title of this Chart.
      Parameters:
      sds - selectable data set (e.g. OneClick table)
      titleColumns - columns to include in the chart title
      Returns:
      this Chart with the title set to display comma-separated values from the table
    • chartTitle

      default Chart chartTitle(boolean showColumnNamesInTitle, SelectableDataSet sds, String... titleColumns)
      Sets the title of this Chart.
      Parameters:
      showColumnNamesInTitle - Whether to show column names in title. If this is true, the title format will include the column name before the comma separated values; otherwise only the comma separated values will be included.
      sds - selectable data set (e.g. OneClick table)
      titleColumns - columns to include in the chart title
      Returns:
      this Chart with the title set to display comma-separated values from the table
    • chartTitle

      Chart chartTitle(String titleFormat, SelectableDataSet sds, String... titleColumns)
      Sets the title of this Chart.
      Parameters:
      titleFormat - a MessageFormat format string for the chart title
      sds - selectable data set (e.g. OneClick table)
      titleColumns - columns to include in the chart title
      Returns:
      this Chart with the title set to display values from the table
    • maxRowsInTitle

      Chart maxRowsInTitle(int maxTitleRows)
      Sets the maximum row values that will be shown in title.

      If total rows < maxRowsCount, then all the values will be shown separated by comma, otherwise just maxRowsCount values will be shown along with ellipsis.
      if maxRowsCount is < 0, all values will be shown.
      if maxRowsCount is 0, then just first value will be shown without ellipsis.
      The default is 0.

      Parameters:
      maxTitleRows - maximum number of row values to show in chart title
      Returns:
      this Chart
    • chartTitleFont

      Chart chartTitleFont(Font font)
      Sets the font of this Chart's title.
      Parameters:
      font - font
      Returns:
      this Chart
    • chartTitleFont

      Chart chartTitleFont(String family, String style, int size)
      Sets the font of this Chart's title.
      Parameters:
      family - font family; if null, set to Arial
      style - font style; if null, set to Font.FontStyle PLAIN
      size - the point size of the Font
      Returns:
      this Chart
    • chartTitleColor

      Chart chartTitleColor(Paint color)
      Sets the color of this Chart's title.
      Parameters:
      color - color
      Returns:
      this Chart
    • chartTitleColor

      Chart chartTitleColor(String color)
      Sets the color of this Chart's title.
      Parameters:
      color - color
      Returns:
      this Chart
    • gridLinesVisible

      Chart gridLinesVisible(boolean gridVisible)
      Sets whether the Chart has grid lines.
      Parameters:
      gridVisible - whether the Chart's grid lines are drawn
      Returns:
      this Chart
    • xGridLinesVisible

      Chart xGridLinesVisible(boolean xGridVisible)
      Sets whether the Chart has grid lines in the x direction.
      Parameters:
      xGridVisible - whether the Chart's x grid lines are drawn
      Returns:
      this Chart
    • yGridLinesVisible

      Chart yGridLinesVisible(boolean yGridVisible)
      Sets whether the Chart has grid lines in the y direction
      Parameters:
      yGridVisible - whether the Chart's y grid lines are drawn
      Returns:
      this Chart
    • legendVisible

      Chart legendVisible(boolean visible)
      Sets whether the Chart's legend is shown or hidden.
      Parameters:
      visible - whether the Chart's legend is shown or hidden
      Returns:
      this Chart
    • legendFont

      Chart legendFont(Font font)
      Sets the font of this Chart's legend.
      Parameters:
      font - font
      Returns:
      this Chart
    • legendFont

      Chart legendFont(String family, String style, int size)
      Sets the font of this Chart's legend.
      Parameters:
      family - font family; if null, set to Arial
      style - font style; if null, set to Font.FontStyle PLAIN
      size - the point size of the Font
      Returns:
      this Chart
    • legendColor

      Chart legendColor(Paint color)
      Sets the color of the text inside the Chart's legend.
      Parameters:
      color - color
      Returns:
      this Chart
    • legendColor

      Chart legendColor(String color)
      Sets the color of the text inside the Chart's legend.
      Parameters:
      color - color
      Returns:
      this Chart
    • span

      Chart span(int rowSpan, int colSpan)
      Sets the size of this Chart within the grid of the figure.
      Parameters:
      rowSpan - how many rows tall
      colSpan - how many columns wide
      Returns:
      this Chart
    • colSpan

      Chart colSpan(int colSpan)
      Sets the size of this Chart within the grid of the figure.
      Parameters:
      colSpan - how many columns wide
      Returns:
      this Chart
    • rowSpan

      Chart rowSpan(int rowSpan)
      Sets the size of this Chart within the grid of the figure.
      Parameters:
      rowSpan - how many rows tall
      Returns:
      this Chart
    • newAxes

      Axes newAxes()
      Creates new Axes on this Chart.
      Returns:
      newly created Axes with dimension 2 on this Chart
    • newAxes

      Axes newAxes(String name)
      Creates new Axes on this Chart.
      Parameters:
      name - name for the axes
      Returns:
      newly created Axes with dimension 2 on this Chart
    • newAxes

      Axes newAxes(int dim)
      Creates new Axes on this Chart.
      Parameters:
      dim - dimensions of the Axes
      Returns:
      newly created Axes with dimension dim on this Chart
    • newAxes

      Axes newAxes(String name, int dim)
      Creates new Axes on this Chart.
      Parameters:
      name - name for the axes
      dim - dimensions of the Axes
      Returns:
      newly created Axes with dimension dim on this Chart
    • axes

      Axes axes(int id)
      Gets an axes.
      Parameters:
      id - axes id.
      Returns:
      selected axes.
    • axes

      Axes axes(String name)
      Gets an axes.
      Parameters:
      name - axes name.
      Returns:
      selected axes.
    • plotOrientation

      Chart plotOrientation(String orientation)
      Sets the orientation of plots in this Chart.
      Parameters:
      orientation - plot orientation
      Returns:
      this Chart