Class BarPlot

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, SizeOfHandler, ColorProviderHandler, Serializable

    public class BarPlot
    extends AbstractXYChartGenerator
    Generates a bar plot by plotting the X column against the Y column.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -width <int> (property: width)
        The width of the chart dialog.
        default: 800
        minimum: -1
     
    -height <int> (property: height)
        The height of the chart dialog.
        default: 600
        minimum: -1
     
    -row-finder <adams.data.spreadsheet.rowfinder.RowFinder> (property: rowFinder)
        The row finder to use for restricting the rows used for the chart.
        default: adams.data.spreadsheet.rowfinder.ByIndex
     
    -x-column <java.lang.String> (property: XColumn)
        The index of the column which values to use on the X axis; An index is a 
        number starting with 1; apart from column names (case-sensitive), the following 
        placeholders can be used as well: first, second, third, last_2, last_1, 
        last
        default: 
     
    -y-columns <java.lang.String> (property: YColumns)
        The range of columns to use on the Y axis; A range is a comma-separated 
        list of single 1-based indices or sub-ranges of indices ('start-end'); '
        inv(...)' inverts the range '...'; apart from column names (case-sensitive
        ), the following placeholders can be used as well: first, second, third, 
        last_2, last_1, last
        default: 
     
    -bar-width <int> (property: barWidth)
        The width of the bar in pixel.
        default: 10
        minimum: 1
     
    -offset <int> (property: offset)
        The offset in pixel for multiple plots.
        default: 3
        minimum: 0
     
    -color-provider <adams.gui.visualization.core.AbstractColorProvider> (property: colorProvider)
        The color provider to use.
        default: adams.gui.visualization.core.DefaultColorProvider
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_BarWidth

        protected int m_BarWidth
        the width of the bar.
      • m_Offset

        protected int m_Offset
        the offset in case of multiple plots.
    • Constructor Detail

      • BarPlot

        public BarPlot()
    • Method Detail

      • setBarWidth

        public void setBarWidth​(int value)
        Sets the width of the bar.
        Parameters:
        value - width in pixel
      • getBarWidth

        public int getBarWidth()
        Returns the width of the bar.
        Returns:
        width in pixel
      • barWidthTipText

        public String barWidthTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setOffset

        public void setOffset​(int value)
        Sets the offset for multiple plots.
        Parameters:
        value - offset in pixel
      • getOffset

        public int getOffset()
        Returns the offset for multiple plots.
        Returns:
        offset in pixel
      • offsetTipText

        public String offsetTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • addChartGeneration

        protected void addChartGeneration​(Flow flow,
                                          String name,
                                          SpreadSheet sheet)
        Adds the chart generation to the flow. The flow already contains forwarding of spreadsheet and selecting subset of rows.
        Overrides:
        addChartGeneration in class AbstractRowBasedChartGenerator
        Parameters:
        flow - the flow to extend
        name - the name of the tab/sheet
        sheet - the spreadsheet to generate the flow for