Class ContinuousBarPlot

  • All Implemented Interfaces:
    ChartPlot, java.io.Serializable

    public class ContinuousBarPlot
    extends StandardPlot
    A general class for plotting data of groups of values. This plot can use data from any class that implements the BaseDataset interface.
    Since:
    8.0
    See Also:
    Serialized Form
    • Field Detail

      • DEFAULT_BAR_STYLE

        public static final ContinuousBarStyle DEFAULT_BAR_STYLE
        Default chart style with this plot.
    • Constructor Detail

      • ContinuousBarPlot

        public ContinuousBarPlot()
        Creates a continuous bar plot with default properties.
        Since:
        8.0
      • ContinuousBarPlot

        public ContinuousBarPlot​(ContinuousBarStyle style)
        Creates a continuous bar plot with defined chart style. Initializes all properties with default values.
        Parameters:
        style - the chart style (null not permitted)
        Since:
        8.0
        See Also:
        ContinuousBarStyle
    • Method Detail

      • setDataAxis

        public void setDataAxis​(ContinuousNumberAxis dataAxis)
        Sets a data axis of this plot. The data axis shows the summarized values of the data fields.
        Parameters:
        dataAxis - the data axis (null not permitted)
        Throws:
        java.lang.IllegalArgumentException - if the axis is null.
        Since:
        8.0
        See Also:
        StandardPlot.getDataAxis(), ContinuousNumberAxis
      • isOverlapping

        public boolean isOverlapping()
        In a ContinuousBarChart, by default, the individual values of different series for each category value are drawn overlapping each other, so that small bars can be covered by larger bars. With the normal BarChart, the bars of the individual values of the series are displayed next to each other. Returns if bars from different series are painted over each other and not beside each other
        Returns:
        true if the bars are overlapping each other
        Since:
        23.4
      • setOverlapping

        public void setOverlapping​(boolean isOverlapping)
        In a ContinuousBarChart, by default, the individual values of different series for each category value are drawn overlapping each other, so that small bars can be covered by larger bars. With the normal BarChart, the bars of the individual values of the series are displayed next to each other. With this setting, the behavior of the ContinousBarChart can be adapted to the behavior of the normal BarCharts.
        Parameters:
        isOverlapping - true if the bars should be overlapping other bars
        Since:
        23.4
      • readProperties

        public void readProperties​(org.w3c.dom.Element element,
                                   Chart2 chart)
        Reads the chart properties from the DOMParser Element.
        Specified by:
        readProperties in interface ChartPlot
        Overrides:
        readProperties in class StandardPlot
        Parameters:
        element - the DOMParser Element
        chart - the chart
      • getSubProperties

        protected java.lang.StringBuilder getSubProperties​(int depth)
        Returns the serialized simple properties of subclasses.
        Overrides:
        getSubProperties in class StandardPlot
        Parameters:
        depth - the depth of XML indent
        Returns:
        the properties.