weka.gui.beans

## Interface OffscreenChartRenderer

- All Known Implementing Classes:
    AbstractOffscreenChartRenderer, WekaOffscreenChartRenderer

      public interface OffscreenChartRenderer

  Interface to something that can render certain types of charts in headless mode.
  Version:
    $Revision: 8034 $
  Author:
    Mark Hall (mhall{[at]}pentaho{[dot]}com)

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `optionsTipTextHTML()` Gets a short list of additional options (if any), suitable for displaying in a tip text, in HTML form
    `java.lang.String` | `rendererName()` The name of this off screen renderer
    `java.awt.image.BufferedImage` | `renderHistogram(int width, int height, java.util.List<Instances> series, java.lang.String attsToPlot, java.util.List<java.lang.String> optionalArgs)` Render histogram(s) (numeric attribute) or bar chart(s) (nominal attribute).
    `java.awt.image.BufferedImage` | `renderXYLineChart(int width, int height, java.util.List<Instances> series, java.lang.String xAxis, java.lang.String yAxis, java.util.List<java.lang.String> optionalArgs)` Render an XY line chart
    `java.awt.image.BufferedImage` | `renderXYScatterPlot(int width, int height, java.util.List<Instances> series, java.lang.String xAxis, java.lang.String yAxis, java.util.List<java.lang.String> optionalArgs)` Render an XY scatter plot

- - ### Method Detail

    - #### rendererName

          java.lang.String rendererName()

      The name of this off screen renderer
      Returns:
        the name of this off screen renderer

    - #### optionsTipTextHTML

          java.lang.String optionsTipTextHTML()

      Gets a short list of additional options (if any), suitable for displaying in a tip text, in HTML form
      Returns:
        additional options description in simple HTML form

    - #### renderXYLineChart

          java.awt.image.BufferedImage renderXYLineChart(int width,
                                                       int height,
                                                       java.util.List<Instances> series,
                                                       java.lang.String xAxis,
                                                       java.lang.String yAxis,
                                                       java.util.List<java.lang.String> optionalArgs)
                                                         throws java.lang.Exception

      Render an XY line chart
      Parameters:
        `width` - the width of the resulting chart in pixels
        `height` - the height of the resulting chart in pixels
        `series` - a list of Instances - one for each series to be plotted
        `xAxis` - the name of the attribute for the x-axis (all series Instances are expected to have an attribute of the same type with this name)
        `yAxis` - the name of the attribute for the y-axis (all series Instances are expected to have an attribute of the same type with this name)
        `optionalArgs` - optional arguments to the renderer (may be null)
      Returns:
        a BufferedImage containing the chart
      Throws:
        `java.lang.Exception` - if there is a problem rendering the chart

    - #### renderXYScatterPlot

          java.awt.image.BufferedImage renderXYScatterPlot(int width,
                                                         int height,
                                                         java.util.List<Instances> series,
                                                         java.lang.String xAxis,
                                                         java.lang.String yAxis,
                                                         java.util.List<java.lang.String> optionalArgs)
                                                           throws java.lang.Exception

      Render an XY scatter plot
      Parameters:
        `width` - the width of the resulting chart in pixels
        `height` - the height of the resulting chart in pixels
        `series` - a list of Instances - one for each series to be plotted
        `xAxis` - the name of the attribute for the x-axis (all series Instances are expected to have an attribute of the same type with this name)
        `yAxis` - the name of the attribute for the y-axis (all series Instances are expected to have an attribute of the same type with this name)
        `optionalArgs` - optional arguments to the renderer (may be null)
      Returns:
        a BufferedImage containing the chart
      Throws:
        `java.lang.Exception` - if there is a problem rendering the chart

    - #### renderHistogram

          java.awt.image.BufferedImage renderHistogram(int width,
                                                     int height,
                                                     java.util.List<Instances> series,
                                                     java.lang.String attsToPlot,
                                                     java.util.List<java.lang.String> optionalArgs)
                                                       throws java.lang.Exception

      Render histogram(s) (numeric attribute) or bar chart(s) (nominal attribute). Some implementations may not be able to render more than one histogram/pie on the same chart - the implementation can either throw an exception or just process the first series in this case.
      Parameters:
        `width` - the width of the resulting chart in pixels
        `height` - the height of the resulting chart in pixels
        `series` - a list of Instances - one for each series to be plotted
        `attToPlot` - the name of the attribute to plot (the attribute, with the, same type, must be present in each series)
        `optionalArgs` - optional arguments to the renderer (may be null)
      Returns:
        a BufferedImage containing the chart
      Throws:
        `java.lang.Exception` - if there is a problem rendering the chart