Class BarSeries

All Implemented Interfaces:
ColorizedSeries<BarSeries>

public class BarSeries extends AxesBaseSeries implements ColorizedSeries<BarSeries>
Series object to be displayed on a bar chart.
Since:
4.0
Author:
JBStrap
  • Field Details

  • Constructor Details

    • BarSeries

      public BarSeries(String title)
      Creates a series object to be displayed on a bar chart.
      Parameters:
      title - Series title (required)
      Throws:
      NullPointerException - Thrown if the specified series name is null
    • BarSeries

      public BarSeries(String title, String dataColumn)
      Creates a series object to be displayed on a bar chart.
      Parameters:
      title - Series title (required)
      dataColumn - The name of the data column that contains the displayed series in the DataDescriptor
      Throws:
      NullPointerException - Thrown if the specified series name is null
  • Method Details

    • setBarTextPositon

      public BarSeries setBarTextPositon(BarTextPosition barTextPosition)
      Sets the position of value labels on the displayed columns. By default, value labels are displayed on the top of columns.
      Parameters:
      barTextPosition - Value label position Available positions are listed in the enum BarTextPosition. If null is specified, value labels are displayed on the top of columns according to the default setting.
      Returns:
      Series object
    • getBarTextPosition

      public BarTextPosition getBarTextPosition()
      Gets the value position in the column.
      Returns:
      Value position
    • setBarTextVisible

      public BarSeries setBarTextVisible(boolean visible)
      Sets if the corresponding values should be displayed in a column. By default, value labels are displayed.
      Parameters:
      visible - If true is specified, values are displayed, otherwise not
      Returns:
      Series object
    • isBarTextVisible

      public boolean isBarTextVisible()
      Checks if values are displayed in the columns.
      Returns:
      If true, values are displayed, otherwise not
    • setBarRadius

      public BarSeries setBarRadius(int radius)
      Sets the rounding radius of the bar chart’s corners. The default rounding setting is 0, that is, bars’ corners are not rounded.
      Parameters:
      radius - Rounding radius of bars in a bar chart in pixels If 0 or a smaller value is specified, the bars do not have rounded corners.
      Returns:
      Series object
    • getBarRadius

      public int getBarRadius()
      Gets the rounding radius of bar chart corners.
      Returns:
      Rounding radius in pixels
    • fromSeries

      public static BarSeries fromSeries(Series series)
      Creates a BarSeries object based on an other Series object.
      Parameters:
      series - The series object used to create the bar series All of the specified series object’s settings are taken over by the bar series. If the specified series does not have the attributes necessary for the bar series, the bar series is created using default values.
      Returns:
      The created bar series object