Class AbstractXYDataSeries

All Implemented Interfaces:
DataSeries, DataSeriesInternal, XYDataSeries, XYDataSeriesInternal, PlotExceptionCause, Series, SeriesInternal, Serializable
Direct Known Subclasses:
OHLCDataSeriesArray, XYDataSeriesArray, XYDataSeriesFunctionImpl

public abstract class AbstractXYDataSeries extends AbstractDataSeries implements XYDataSeriesInternal
Base class for the XYDataSeriesInternal.
See Also:
  • Constructor Details

    • AbstractXYDataSeries

      public AbstractXYDataSeries(AxesImpl axes, int id, Comparable name, AbstractXYDataSeries series)
      Creates an AbstractXYDataSeries instance.
      Parameters:
      axes - axes on which the data will be plotted
      id - data series id
      name - series name
    • AbstractXYDataSeries

      protected AbstractXYDataSeries(AbstractXYDataSeries series, AxesImpl axes)
      Creates a copy of a series using a different Axes.
      Parameters:
      series - series to copy.
      axes - new axes to use.
  • Method Details

    • colorsSetSpecific

      protected void colorsSetSpecific(IndexableData<Paint> data)
    • getSeriesColor

      public Paint getSeriesColor()
      Description copied from interface: DataSeriesInternal
      Gets the series color.
      Specified by:
      getSeriesColor in interface DataSeriesInternal
      Returns:
      series color
    • getPointLabel

      public String getPointLabel()
      Description copied from interface: XYDataSeriesInternal
      Gets the default label for data points.
      Specified by:
      getPointLabel in interface XYDataSeriesInternal
      Returns:
      default label for data points.
    • getPointLabel

      public String getPointLabel(int i)
      Description copied from interface: XYDataSeriesInternal
      Gets the label of the data point at index i.
      Specified by:
      getPointLabel in interface XYDataSeriesInternal
      Parameters:
      i - index
      Returns:
      label of this data point at index i
    • getPointShape

      public Shape getPointShape()
      Description copied from interface: XYDataSeriesInternal
      Gets the default shape for data points.
      Specified by:
      getPointShape in interface XYDataSeriesInternal
      Returns:
      default shape for data points.
    • getPointShape

      public Shape getPointShape(int i)
      Description copied from interface: XYDataSeriesInternal
      Gets the shape of the data point at index i.
      Specified by:
      getPointShape in interface XYDataSeriesInternal
      Parameters:
      i - index
      Returns:
      shape of this data point at index i
    • getPointSize

      public Double getPointSize()
      Description copied from interface: XYDataSeriesInternal
      Gets the default size for data points.
      Specified by:
      getPointSize in interface XYDataSeriesInternal
      Returns:
      default size for data points
    • getPointSize

      public Double getPointSize(int i)
      Description copied from interface: XYDataSeriesInternal
      Gets the size of the data point at index i.
      Specified by:
      getPointSize in interface XYDataSeriesInternal
      Parameters:
      i - index
      Returns:
      size of this data point at index i
    • getPointColor

      public Paint getPointColor()
      Description copied from interface: XYDataSeriesInternal
      Gets the default color for data points.
      Specified by:
      getPointColor in interface XYDataSeriesInternal
      Returns:
      default color for data points.
    • getPointColor

      public Paint getPointColor(int i)
      Description copied from interface: XYDataSeriesInternal
      Gets the color of the data point at index i.
      Specified by:
      getPointColor in interface XYDataSeriesInternal
      Parameters:
      i - index
      Returns:
      color of this data point at index i
    • linesVisible

      public AbstractXYDataSeries linesVisible(Boolean visible)
      Description copied from interface: DataSeries
      Sets whether lines are visible.
      Specified by:
      linesVisible in interface DataSeries
      Parameters:
      visible - line visibility
      Returns:
      this data series.
    • pointsVisible

      public AbstractXYDataSeries pointsVisible(Boolean visible)
      Description copied from interface: DataSeries
      Sets whether points are visible.
      Specified by:
      pointsVisible in interface DataSeries
      Parameters:
      visible - point visibility
      Returns:
      this data series.
    • gradientVisible

      public AbstractXYDataSeries gradientVisible(boolean gradientVisible)
      Description copied from interface: DataSeries
      Sets whether bar gradients are visible.
      Specified by:
      gradientVisible in interface DataSeries
      Parameters:
      gradientVisible - bar gradient visibility
      Returns:
      this data series.
    • lineColor

      public AbstractXYDataSeries lineColor(Paint color)
      Description copied from interface: DataSeries
      Defines the default line color.
      Specified by:
      lineColor in interface DataSeries
      Parameters:
      color - color
      Returns:
      this data series.
    • lineColor

      public AbstractXYDataSeries lineColor(int color)
      Description copied from interface: DataSeries
      Defines the default line color.
      Specified by:
      lineColor in interface DataSeries
      Parameters:
      color - color palette index
      Returns:
      this data series.
    • lineColor

      public AbstractXYDataSeries lineColor(String color)
      Description copied from interface: DataSeries
      Defines the default line color.
      Specified by:
      lineColor in interface DataSeries
      Parameters:
      color - color
      Returns:
      this data series.
    • errorBarColor

      public AbstractXYDataSeries errorBarColor(Paint errorBarColor)
      Description copied from interface: DataSeries
      Sets the error bar Paint for this dataset.
      Specified by:
      errorBarColor in interface DataSeries
      Parameters:
      errorBarColor - color
      Returns:
      this DataSeries
    • errorBarColor

      public AbstractXYDataSeries errorBarColor(int errorBarColor)
      Description copied from interface: DataSeries
      Sets the error bar Paint for this dataset.
      Specified by:
      errorBarColor in interface DataSeries
      Parameters:
      errorBarColor - index of the color in the series color palette
      Returns:
      this DataSeries
    • errorBarColor

      public AbstractXYDataSeries errorBarColor(String errorBarColor)
      Description copied from interface: DataSeries
      Sets the error bar Paint for this dataset.
      Specified by:
      errorBarColor in interface DataSeries
      Parameters:
      errorBarColor - color
      Returns:
      this DataSeries
    • lineStyle

      public AbstractXYDataSeries lineStyle(LineStyle lineStyle)
      Description copied from interface: DataSeries
      Sets the line style.
      Specified by:
      lineStyle in interface DataSeries
      Parameters:
      lineStyle - style
      Returns:
      this data series.
    • seriesColor

      public AbstractXYDataSeries seriesColor(Paint color)
      Description copied from interface: DataSeries
      Defines the default line and point color.
      Specified by:
      seriesColor in interface DataSeries
      Parameters:
      color - color
      Returns:
      this data series.
    • seriesColor

      public AbstractXYDataSeries seriesColor(int color)
      Description copied from interface: DataSeries
      Defines the default line and point color.
      Specified by:
      seriesColor in interface DataSeries
      Parameters:
      color - color
      Returns:
      this data series.
    • seriesColor

      public AbstractXYDataSeries seriesColor(String color)
      Description copied from interface: DataSeries
      Defines the default line and point color.
      Specified by:
      seriesColor in interface DataSeries
      Parameters:
      color - color
      Returns:
      this data series.
    • pointSize

      public XYDataSeriesInternal pointSize(int pointSize)
      Description copied from interface: DataSeries
      Sets the point size. A scale factor of 1 is the default size. A scale factor of 2 is 2x the default size. Unspecified points use the default size.
      Specified by:
      pointSize in interface DataSeries
      Parameters:
      pointSize - point size
      Returns:
      this data series.
    • pointSize

      public XYDataSeriesInternal pointSize(long pointSize)
      Description copied from interface: DataSeries
      Sets the point size. A scale factor of 1 is the default size. A scale factor of 2 is 2x the default size. Unspecified points use the default size.
      Specified by:
      pointSize in interface DataSeries
      Parameters:
      pointSize - point size
      Returns:
      this data series.
    • pointSize

      public XYDataSeriesInternal pointSize(double pointSize)
      Description copied from interface: DataSeries
      Sets the point size. A scale factor of 1 is the default size. A scale factor of 2 is 2x the default size. Unspecified points use the default size.
      Specified by:
      pointSize in interface DataSeries
      Parameters:
      pointSize - point size
      Returns:
      this data series.
    • pointSize

      public XYDataSeriesInternal pointSize(Number pointSize)
      Description copied from interface: DataSeries
      Sets the point size. A scale factor of 1 is the default size. A scale factor of 2 is 2x the default size. Unspecified points use the default size.
      Specified by:
      pointSize in interface DataSeries
      Parameters:
      pointSize - point size
      Returns:
      this data series.
    • pointSize

      public AbstractXYDataSeries pointSize(IndexableData<Double> pointSizes)
      Description copied from interface: XYDataSeries
      Sets the point size. A scale factor of 1 is the default size. A scale factor of 2 is 2x the default size. Unspecified points use the default size.
      Specified by:
      pointSize in interface XYDataSeries
      Parameters:
      pointSizes - factors to multiply the default size (1) by
      Returns:
      this XYDataSeries
    • pointSize

      public AbstractXYDataSeries pointSize(int... pointSizes)
      Description copied from interface: XYDataSeries
      Sets the point size. A scale factor of 1 is the default size. A scale factor of 2 is 2x the default size. Unspecified points use the default size.
      Specified by:
      pointSize in interface XYDataSeries
      Parameters:
      pointSizes - factors to multiply the default size (1) by
      Returns:
      this XYDataSeries
    • pointSize

      public AbstractXYDataSeries pointSize(long... pointSizes)
      Description copied from interface: XYDataSeries
      Sets the point size. A scale factor of 1 is the default size. A scale factor of 2 is 2x the default size. Unspecified points use the default size.
      Specified by:
      pointSize in interface XYDataSeries
      Parameters:
      pointSizes - factors to multiply the default size (1) by
      Returns:
      this XYDataSeries
    • pointSize

      public AbstractXYDataSeries pointSize(double... pointSizes)
      Description copied from interface: XYDataSeries
      Sets the point size. A scale factor of 1 is the default size. A scale factor of 2 is 2x the default size. Unspecified points use the default size.
      Specified by:
      pointSize in interface XYDataSeries
      Parameters:
      pointSizes - factors to multiply the default size (1) by
      Returns:
      this XYDataSeries
    • pointSize

      public <T extends Number> AbstractXYDataSeries pointSize(T[] pointSizes)
      Description copied from interface: XYDataSeries
      Sets the point size. A scale factor of 1 is the default size. A scale factor of 2 is 2x the default size. Unspecified points use the default size.
      Specified by:
      pointSize in interface XYDataSeries
      Type Parameters:
      T - data type of the factors
      Parameters:
      pointSizes - factors to multiply the default size (1) by
      Returns:
      this XYDataSeries
    • pointSize

      public AbstractXYDataSeries pointSize(Table t, String pointSizes)
      Description copied from interface: XYDataSeries
      Sets the point size. A scale factor of 1 is the default size. A scale factor of 2 is 2x the default size. Unspecified points use the default size.
      Specified by:
      pointSize in interface XYDataSeries
      Parameters:
      t - table containing factors to multiply the default size (1) by
      pointSizes - column in t containing size scaling factors. The size data for point i comes from row i.
      Returns:
      this XYDataSeries
    • pointSize

      public AbstractXYDataSeries pointSize(SelectableDataSet sds, String pointSize)
      Description copied from interface: XYDataSeries
      Sets the point size. A scale factor of 1 is the default size. A scale factor of 2 is 2x the default size. Unspecified points use the default size.
      Specified by:
      pointSize in interface XYDataSeries
      Parameters:
      sds - selectable data set (e.g. OneClick filterable table) containing factors to multiply the default size (1) by
      pointSize - column in sds containing size scaling factors. The size data for point i comes from row i.
      Returns:
      this XYDataSeries
    • pointColor

      public AbstractXYDataSeries pointColor(Paint pointColor)
      Description copied from interface: DataSeries
      Sets the point color. Unspecified points use the default color.
      Specified by:
      pointColor in interface DataSeries
      Parameters:
      pointColor - color
      Returns:
      this data series.
    • pointColor

      public AbstractXYDataSeries pointColor(int pointColor)
      Description copied from interface: DataSeries
      Sets the point color. Unspecified points use the default color.
      Specified by:
      pointColor in interface DataSeries
      Parameters:
      pointColor - color
      Returns:
      this data series.
    • pointColor

      public AbstractXYDataSeries pointColor(String pointColor)
      Description copied from interface: DataSeries
      Sets the point color. Unspecified points use the default color.
      Specified by:
      pointColor in interface DataSeries
      Parameters:
      pointColor - color
      Returns:
      this data series.
    • pointColor

      public <T extends Paint> AbstractXYDataSeries pointColor(IndexableData<T> pointColor)
      Description copied from interface: XYDataSeries
      Sets the point color. Unspecified points use the default color.
      Specified by:
      pointColor in interface XYDataSeries
      Type Parameters:
      T - data type of the colors
      Parameters:
      pointColor - colors. The color for data point i comes from index i.
      Returns:
      this XYDataSeries
    • pointColor

      public AbstractXYDataSeries pointColor(Paint... pointColor)
      Description copied from interface: XYDataSeries
      Sets the point color. Unspecified points use the default color.
      Specified by:
      pointColor in interface XYDataSeries
      Parameters:
      pointColor - colors. The color for data point i comes from index i.
      Returns:
      this XYDataSeries
    • pointColorInteger

      public AbstractXYDataSeries pointColorInteger(IndexableData<Integer> colors)
      Description copied from interface: XYDataSeries
      Sets the point color. Unspecified points use the default color.
      Specified by:
      pointColorInteger in interface XYDataSeries
      Parameters:
      colors - colors. The color for data point i comes from index i.
      Returns:
      this XYDataSeries
    • pointColor

      public AbstractXYDataSeries pointColor(int... pointColors)
      Description copied from interface: XYDataSeries
      Sets the point color. Unspecified points use the default color.
      Specified by:
      pointColor in interface XYDataSeries
      Parameters:
      pointColors - color palette indices. The color for data point i comes from index i. A value of 3 corresponds to the 3rd color from the color pallette.
      Returns:
      this XYDataSeries
    • pointColor

      public AbstractXYDataSeries pointColor(Integer... pointColors)
      Description copied from interface: XYDataSeries
      Sets the point color. Unspecified points use the default color.
      Specified by:
      pointColor in interface XYDataSeries
      Parameters:
      pointColors - color palette indices. The color for data point i comes from index i. A value of 3 corresponds to the 3rd color from the color pallette.
      Returns:
      this XYDataSeries
    • pointColor

      public AbstractXYDataSeries pointColor(String... pointColors)
      Description copied from interface: XYDataSeries
      Sets the point color. Unspecified points use the default color.
      Specified by:
      pointColor in interface XYDataSeries
      Parameters:
      pointColors - color names. The color for data point i comes from index i.
      Returns:
      this XYDataSeries
    • pointColor

      public AbstractXYDataSeries pointColor(Table t, String pointColors)
      Description copied from interface: XYDataSeries
      Sets the point color. Unspecified points use the default color.
      Specified by:
      pointColor in interface XYDataSeries
      Parameters:
      t - table containing colors
      pointColors - column in t containing colors. The color data for point i comes from row i.
      Returns:
      this XYDataSeries
    • pointColor

      public AbstractXYDataSeries pointColor(SelectableDataSet sds, String pointColors)
      Description copied from interface: XYDataSeries
      Sets the point color. Unspecified points use the default color.
      Specified by:
      pointColor in interface XYDataSeries
      Parameters:
      sds - selectable data set (e.g. OneClick filterable table) containing colors
      pointColors - column in sds containing colors. The color data for point i comes from row i.
      Returns:
      this XYDataSeries
    • pointLabel

      public AbstractXYDataSeries pointLabel(Object pointLabel)
      Description copied from interface: DataSeries
      Sets the point label for data point i from index i of the input labels. Points outside of these indices are unlabeled.
      Specified by:
      pointLabel in interface DataSeries
      Parameters:
      pointLabel - label
      Returns:
      this XYDataSeries
    • pointLabel

      public AbstractXYDataSeries pointLabel(IndexableData<?> pointLabels)
      Description copied from interface: XYDataSeries
      Sets the point label for data point i from index i of the input labels. Points outside of these indices are unlabeled.
      Specified by:
      pointLabel in interface XYDataSeries
      Parameters:
      pointLabels - labels
      Returns:
      this XYDataSeries
    • pointLabel

      public AbstractXYDataSeries pointLabel(Object... pointLabels)
      Description copied from interface: XYDataSeries
      Sets the point label for data point i from index i of the input labels. Points outside of these indices are unlabeled.
      Specified by:
      pointLabel in interface XYDataSeries
      Parameters:
      pointLabels - labels
      Returns:
      this XYDataSeries
    • pointLabel

      public AbstractXYDataSeries pointLabel(@NotNull @NotNull Table t, @NotNull @NotNull String pointLabel)
      Description copied from interface: XYDataSeries
      Sets the point label for data point i from index i of the input labels. Points outside of these indices are unlabeled.
      Specified by:
      pointLabel in interface XYDataSeries
      Parameters:
      t - table containing labels
      pointLabel - column in t containing labels. The label data for point i comes from row i.
      Returns:
      this XYDataSeries
    • pointLabel

      public AbstractXYDataSeries pointLabel(@NotNull @NotNull SelectableDataSet sds, @NotNull @NotNull String pointLabel)
      Description copied from interface: XYDataSeries
      Sets the point label for data point i from index i of the input labels. Points outside of these indices are unlabeled.
      Specified by:
      pointLabel in interface XYDataSeries
      Parameters:
      sds - selectable data set (e.g. OneClick filterable table) containing labels
      pointLabel - column in sds containing labels. The color data for point i comes from row i.
      Returns:
      this XYDataSeries
    • pointShape

      public DataSeries pointShape(String pointShape)
      Description copied from interface: DataSeries
      Sets the point shapes for data point i from index i of the input labels. Points outside of these indices use default shapes.
      Specified by:
      pointShape in interface DataSeries
      Parameters:
      pointShape - shape
      Returns:
      this DataSeries
    • pointShape

      public DataSeries pointShape(Shape pointShape)
      Description copied from interface: DataSeries
      Sets the point shapes for data point i from index i of the input labels. Points outside of these indices use default shapes.
      Specified by:
      pointShape in interface DataSeries
      Parameters:
      pointShape - shape
      Returns:
      this DataSeries
    • pointShape

      public XYDataSeries pointShape(IndexableData<String> pointShapes)
      Description copied from interface: XYDataSeries
      Sets the point shapes for data point i from index i of the input labels. Points outside of these indices use default shapes.
      Specified by:
      pointShape in interface XYDataSeries
      Parameters:
      pointShapes - shapes
      Returns:
      this XYDataSeries
    • pointShape

      public XYDataSeries pointShape(String... pointShapes)
      Description copied from interface: XYDataSeries
      Sets the point shapes for data point i from index i of the input labels. Points outside of these indices use default shapes.
      Specified by:
      pointShape in interface XYDataSeries
      Parameters:
      pointShapes - shapes
      Returns:
      this XYDataSeries
    • pointShape

      public XYDataSeries pointShape(Shape... pointShapes)
      Description copied from interface: XYDataSeries
      Sets the point shapes for data point i from index i of the input labels. Points outside of these indices use default shapes.
      Specified by:
      pointShape in interface XYDataSeries
      Parameters:
      pointShapes - shapes
      Returns:
      this XYDataSeries
    • pointShape

      public XYDataSeries pointShape(Table t, String pointShape)
      Description copied from interface: XYDataSeries
      Sets the point shapes for data point i from index i of the input labels. Points outside of these indices use default shapes.
      Specified by:
      pointShape in interface XYDataSeries
      Parameters:
      t - table containing shapes
      pointShape - column in t containing shapes. The shape data for point i comes from row i.
      Returns:
      this XYDataSeries
    • pointShape

      public XYDataSeries pointShape(SelectableDataSet sds, String pointShape)
      Description copied from interface: XYDataSeries
      Sets the point shapes for data point i from index i of the input labels. Points outside of these indices use default shapes.
      Specified by:
      pointShape in interface XYDataSeries
      Parameters:
      sds - selectable data set (e.g. OneClick filterable table) containing shapes
      pointShape - column in sds containing shapes. The color data for point i comes from row i.
      Returns:
      this XYDataSeries
    • pointLabelFormat

      public AbstractXYDataSeries pointLabelFormat(String pointLabelFormat)
      Description copied from interface: DataSeries
      Sets the point label format.

      Use {0} where the data series name should be inserted, {1} for the x-value and {2} y-value e.g. "{0}: ({1}, {2})" will display as Series1: (2.0, 5.5).

      Specified by:
      pointLabelFormat in interface DataSeries
      Parameters:
      pointLabelFormat - format
      Returns:
      this data series.
    • xToolTipPattern

      public AbstractXYDataSeries xToolTipPattern(String xToolTipPattern)
      Description copied from interface: DataSeries
      Sets the x-value tooltip format.
      Specified by:
      xToolTipPattern in interface DataSeries
      Parameters:
      xToolTipPattern - format
      Returns:
      this data series.
    • yToolTipPattern

      public AbstractXYDataSeries yToolTipPattern(String yToolTipPattern)
      Description copied from interface: DataSeries
      Sets the y-value tooltip format.
      Specified by:
      yToolTipPattern in interface DataSeries
      Parameters:
      yToolTipPattern - format
      Returns:
      this data series.
    • toolTipPattern

      public AbstractXYDataSeries toolTipPattern(String toolTipPattern)
      Description copied from interface: DataSeries
      Sets the tooltip format.
      Specified by:
      toolTipPattern in interface DataSeries
      Parameters:
      toolTipPattern - format
      Returns:
      this data series.