Class YIntervalSeries

    • Constructor Detail

      • YIntervalSeries

        public YIntervalSeries​(java.lang.Comparable key)
        Creates a new empty series. By default, items added to the series will be sorted into ascending order by x-value, and duplicate x-values will be allowed (these defaults can be modified with another constructor.
        Parameters:
        key - the series key (null not permitted).
      • YIntervalSeries

        public YIntervalSeries​(java.lang.Comparable key,
                               boolean autoSort,
                               boolean allowDuplicateXValues)
        Constructs a new xy-series that contains no data. You can specify whether or not duplicate x-values are allowed for the series.
        Parameters:
        key - the series key (null not permitted).
        autoSort - a flag that controls whether or not the items in the series are sorted.
        allowDuplicateXValues - a flag that controls whether duplicate x-values are allowed.
    • Method Detail

      • add

        public void add​(double x,
                        double y,
                        double yLow,
                        double yHigh)
        Adds a data item to the series and sends a SeriesChangeEvent to all registered listeners.
        Parameters:
        x - the x-value.
        y - the y-value.
        yLow - the lower bound of the y-interval.
        yHigh - the upper bound of the y-interval.
      • add

        public void add​(YIntervalDataItem item,
                        boolean notify)
        Adds a data item to the series and, if requested, sends a SeriesChangeEvent to all registered listeners.
        Parameters:
        item - the data item (null not permitted).
        notify - notify listeners?
      • getX

        public java.lang.Number getX​(int index)
        Returns the x-value for the specified item.
        Parameters:
        index - the item index.
        Returns:
        The x-value (never null).
      • getYValue

        public double getYValue​(int index)
        Returns the y-value for the specified item.
        Parameters:
        index - the item index.
        Returns:
        The y-value.
      • getYLowValue

        public double getYLowValue​(int index)
        Returns the lower bound of the Y-interval for the specified item in the series.
        Parameters:
        index - the item index.
        Returns:
        The lower bound of the Y-interval.
      • getYHighValue

        public double getYHighValue​(int index)
        Returns the upper bound of the y-interval for the specified item in the series.
        Parameters:
        index - the item index.
        Returns:
        The upper bound of the y-interval.