Class ChartImpl

java.lang.Object
io.deephaven.plot.ChartImpl
All Implemented Interfaces:
Chart, PlotExceptionCause, Serializable

public class ChartImpl extends Object implements Chart, PlotExceptionCause
Represents a graph. Contains Axes objects.
See Also:
  • Method Details

    • figure

      public BaseFigureImpl figure()
      Gets the BaseFigure this Chart is in.
      Returns:
      the BaseFigure containing this Chart
    • colSpan

      public int colSpan()
      Gets the width of this Chart inside the BaseFigure
      Returns:
      width of this Chart inside the BaseFigure
    • rowSpan

      public int rowSpan()
      Gets the height of this Chart inside the BaseFigure
      Returns:
      height of this Chart inside the BaseFigure
    • column

      public int column()
    • row

      public int row()
    • dimension

      public int dimension()
    • getAxis

      public List<AxisImpl>[] getAxis()
      Gets the AxisImpls in this Chart.
      Returns:
      AxisImpl in this Chart
    • getAxes

      public List<AxesImpl> getAxes()
      Gets the AxesImpls in this Chart.
      Returns:
      AxesImpls in this Chart
    • getChartType

      public ChartType getChartType()
      Gets the ChartType of this Chart.
      Returns:
      ChartType of this Chart
    • getTitle

      public String getTitle()
      Gets the title of this Chart.
      Returns:
      this Chart's title
    • getTitleFont

      public Font getTitleFont()
      Gets the Font of this Chart's title.
      Returns:
      this Chart's title's Font
    • getTitleColor

      public Paint getTitleColor()
      Gets the Paint of this Chart's title.
      Returns:
      this Chart's title's Paint
    • getLegendFont

      public Font getLegendFont()
      Gets the Font of this Chart's legend.
      Returns:
      this Chart's legend's Font
    • getLegendColor

      public Paint getLegendColor()
      Gets the Paint of this Chart's legend.
      Returns:
      this Chart's legend's Paint
    • isDisplayXGridLines

      public Boolean isDisplayXGridLines()
      Whether the grid lines in the x direction will be drawn.
      Returns:
      true if this Chart's x grid lines will be drawn, else false
    • isDisplayYGridLines

      public Boolean isDisplayYGridLines()
      Whether the grid lines in the y direction will be drawn.
      Returns:
      true if this Chart's y grid lines will be drawn, else false
    • isShowLegend

      public boolean isShowLegend()
      Whether this Chart's legend will be drawn.
      Returns:
      true if this Chart's legend will be drawn, false otherwise
    • getPlotOrientation

      public ChartImpl.PlotOrientation getPlotOrientation()
      Gets the ChartImpl.PlotOrientation of this Chart.
      Returns:
      ChartImpl.PlotOrientation of this Chart.
    • getPlotInfo

      public PlotInfo getPlotInfo()
      Specified by:
      getPlotInfo in interface PlotExceptionCause
    • getChartTitle

      public ChartTitle getChartTitle()
      Gets the ChartTitle instance
      Returns:
      ChartTitle instance
    • chartRemoveSeries

      public ChartImpl chartRemoveSeries(String... removeSeriesNames)
      Description copied from interface: Chart
      Removes the series with the specified names from this Chart.
      Specified by:
      chartRemoveSeries in interface Chart
      Parameters:
      removeSeriesNames - series names
      Returns:
      this Chart
    • chartTitle

      public ChartImpl chartTitle(String title)
      Description copied from interface: Chart
      Sets the title of this Chart.
      Specified by:
      chartTitle in interface Chart
      Parameters:
      title - title
      Returns:
      this Chart
    • chartTitle

      public ChartImpl chartTitle(String titleFormat, Table t, String... titleColumns)
      Description copied from interface: Chart
      Sets the title of this Chart.
      Specified by:
      chartTitle in interface 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

      public ChartImpl chartTitle(String titleFormat, SelectableDataSet sds, String... titleColumns)
      Description copied from interface: Chart
      Sets the title of this Chart.
      Specified by:
      chartTitle in interface 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

      public Chart maxRowsInTitle(int maxTitleRows)
      Description copied from interface: Chart
      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.

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

      public ChartImpl chartTitleFont(Font font)
      Description copied from interface: Chart
      Sets the font of this Chart's title.
      Specified by:
      chartTitleFont in interface Chart
      Parameters:
      font - font
      Returns:
      this Chart
    • chartTitleFont

      public ChartImpl chartTitleFont(String family, String style, int size)
      Description copied from interface: Chart
      Sets the font of this Chart's title.
      Specified by:
      chartTitleFont in interface Chart
      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

      public ChartImpl chartTitleColor(Paint color)
      Description copied from interface: Chart
      Sets the color of this Chart's title.
      Specified by:
      chartTitleColor in interface Chart
      Parameters:
      color - color
      Returns:
      this Chart
    • chartTitleColor

      public ChartImpl chartTitleColor(String color)
      Description copied from interface: Chart
      Sets the color of this Chart's title.
      Specified by:
      chartTitleColor in interface Chart
      Parameters:
      color - color
      Returns:
      this Chart
    • gridLinesVisible

      public Chart gridLinesVisible(boolean gridVisible)
      Description copied from interface: Chart
      Sets whether the Chart has grid lines.
      Specified by:
      gridLinesVisible in interface Chart
      Parameters:
      gridVisible - whether the Chart's grid lines are drawn
      Returns:
      this Chart
    • xGridLinesVisible

      public Chart xGridLinesVisible(boolean xGridVisible)
      Description copied from interface: Chart
      Sets whether the Chart has grid lines in the x direction.
      Specified by:
      xGridLinesVisible in interface Chart
      Parameters:
      xGridVisible - whether the Chart's x grid lines are drawn
      Returns:
      this Chart
    • yGridLinesVisible

      public Chart yGridLinesVisible(boolean yGridVisible)
      Description copied from interface: Chart
      Sets whether the Chart has grid lines in the y direction
      Specified by:
      yGridLinesVisible in interface Chart
      Parameters:
      yGridVisible - whether the Chart's y grid lines are drawn
      Returns:
      this Chart
    • legendVisible

      public ChartImpl legendVisible(boolean visible)
      Description copied from interface: Chart
      Sets whether the Chart's legend is shown or hidden.
      Specified by:
      legendVisible in interface Chart
      Parameters:
      visible - whether the Chart's legend is shown or hidden
      Returns:
      this Chart
    • legendFont

      public ChartImpl legendFont(Font font)
      Description copied from interface: Chart
      Sets the font of this Chart's legend.
      Specified by:
      legendFont in interface Chart
      Parameters:
      font - font
      Returns:
      this Chart
    • legendFont

      public ChartImpl legendFont(String family, String style, int size)
      Description copied from interface: Chart
      Sets the font of this Chart's legend.
      Specified by:
      legendFont in interface Chart
      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

      public ChartImpl legendColor(Paint color)
      Description copied from interface: Chart
      Sets the color of the text inside the Chart's legend.
      Specified by:
      legendColor in interface Chart
      Parameters:
      color - color
      Returns:
      this Chart
    • legendColor

      public ChartImpl legendColor(String color)
      Description copied from interface: Chart
      Sets the color of the text inside the Chart's legend.
      Specified by:
      legendColor in interface Chart
      Parameters:
      color - color
      Returns:
      this Chart
    • span

      public ChartImpl span(int rowSpan, int colSpan)
      Description copied from interface: Chart
      Sets the size of this Chart within the grid of the figure.
      Specified by:
      span in interface Chart
      Parameters:
      rowSpan - how many rows tall
      colSpan - how many columns wide
      Returns:
      this Chart
    • colSpan

      public ChartImpl colSpan(int colSpan)
      Description copied from interface: Chart
      Sets the size of this Chart within the grid of the figure.
      Specified by:
      colSpan in interface Chart
      Parameters:
      colSpan - how many columns wide
      Returns:
      this Chart
    • rowSpan

      public ChartImpl rowSpan(int rowSpan)
      Description copied from interface: Chart
      Sets the size of this Chart within the grid of the figure.
      Specified by:
      rowSpan in interface Chart
      Parameters:
      rowSpan - how many rows tall
      Returns:
      this Chart
    • newAxes

      public AxesImpl newAxes()
      Description copied from interface: Chart
      Creates new Axes on this Chart.
      Specified by:
      newAxes in interface Chart
      Returns:
      newly created Axes with dimension 2 on this Chart
    • newAxes

      public AxesImpl newAxes(String name)
      Description copied from interface: Chart
      Creates new Axes on this Chart.
      Specified by:
      newAxes in interface Chart
      Parameters:
      name - name for the axes
      Returns:
      newly created Axes with dimension 2 on this Chart
    • newAxes

      public AxesImpl newAxes(int dim)
      Description copied from interface: Chart
      Creates new Axes on this Chart.
      Specified by:
      newAxes in interface Chart
      Parameters:
      dim - dimensions of the Axes
      Returns:
      newly created Axes with dimension dim on this Chart
    • newAxes

      public AxesImpl newAxes(String name, int dim)
      Description copied from interface: Chart
      Creates new Axes on this Chart.
      Specified by:
      newAxes in interface Chart
      Parameters:
      name - name for the axes
      dim - dimensions of the Axes
      Returns:
      newly created Axes with dimension dim on this Chart
    • axes

      public Axes axes(int id)
      Description copied from interface: Chart
      Gets an axes.
      Specified by:
      axes in interface Chart
      Parameters:
      id - axes id.
      Returns:
      selected axes.
    • axes

      public Axes axes(String name)
      Description copied from interface: Chart
      Gets an axes.
      Specified by:
      axes in interface Chart
      Parameters:
      name - axes name.
      Returns:
      selected axes.
    • plotOrientation

      public ChartImpl plotOrientation(ChartImpl.PlotOrientation orientation)
    • plotOrientation

      public ChartImpl plotOrientation(String orientation)
      Description copied from interface: Chart
      Sets the orientation of plots in this Chart.
      Specified by:
      plotOrientation in interface Chart
      Parameters:
      orientation - plot orientation
      Returns:
      this Chart