Class OHLCSeries


public class OHLCSeries extends MarkerSeries
  • Field Details

    • xData

      private double[] xData
    • openData

      private double[] openData
    • highData

      private double[] highData
    • lowData

      private double[] lowData
    • closeData

      private double[] closeData
    • volumeData

      private long[] volumeData
    • yData

      private double[] yData
    • ohlcSeriesRenderStyle

      private OHLCSeries.OHLCSeriesRenderStyle ohlcSeriesRenderStyle
    • upColor

      private Color upColor
      Up Color
    • downColor

      private Color downColor
      Down Color
  • Constructor Details

    • OHLCSeries

      public OHLCSeries(String name, double[] xData, double[] openData, double[] highData, double[] lowData, double[] closeData, Series.DataType xAxisDataType)
      Constructor
      Parameters:
      name -
      xData -
      openData -
      highData -
      lowData -
      closeData -
    • OHLCSeries

      public OHLCSeries(String name, double[] xData, double[] openData, double[] highData, double[] lowData, double[] closeData, long[] volumeData, Series.DataType xAxisDataType)
      Constructor
      Parameters:
      name -
      xData -
      openData -
      highData -
      lowData -
      closeData -
      volumeData -
    • OHLCSeries

      public OHLCSeries(String name, double[] xData, double[] yData, Series.DataType xAxisDataType)
      Constructor
      Parameters:
      name -
      xData -
      yData -
      xAxisDataType -
  • Method Details

    • getOhlcSeriesRenderStyle

      public OHLCSeries.OHLCSeriesRenderStyle getOhlcSeriesRenderStyle()
    • setOhlcSeriesRenderStyle

      public OHLCSeries setOhlcSeriesRenderStyle(OHLCSeries.OHLCSeriesRenderStyle ohlcSeriesRenderStyle)
    • getUpColor

      public Color getUpColor()
    • setUpColor

      public OHLCSeries setUpColor(Color color)
      Set the up color of the series
      Parameters:
      color -
    • getDownColor

      public Color getDownColor()
    • setDownColor

      public OHLCSeries setDownColor(Color color)
      Set the down color of the series
      Parameters:
      color -
    • getLegendRenderType

      public RenderableSeries.LegendRenderType getLegendRenderType()
      Specified by:
      getLegendRenderType in class Series
    • replaceData

      void replaceData(double[] newXData, double[] newOpenData, double[] newHighData, double[] newLowData, double[] newCloseData)
      This is an internal method which shouldn't be called from client code. Use OHLCChart.updateOHLCSeries(String, List, List, List, List, List) instead!
      Parameters:
      newXData -
      newOpenData -
      newHighData -
      newLowData -
      newCloseData -
    • replaceData

      void replaceData(double[] newXData, double[] newOpenData, double[] newHighData, double[] newLowData, double[] newCloseData, long[] newVolumeData)
      This is an internal method which shouldn't be called from client code. Use OHLCChart.updateOHLCSeries(String, List, List, List, List, List) instead!
      Parameters:
      newXData -
      newOpenData -
      newHighData -
      newLowData -
      newCloseData -
      newVolumeData -
    • replaceData

      void replaceData(double[] newXData, double[] newYData)
      This is an internal method which shouldn't be called from client code. Use OHLCChart.updateOHLCSeries(String, List, List, List, List, List) instead!
      Parameters:
      newXData -
      newYData -
    • findMinMax

      private double[] findMinMax(double[] lows, double[] highs)
      Finds the min and max of a dataset
      Parameters:
      lows -
      highs -
      Returns:
    • calculateMinMax

      protected void calculateMinMax()
      Specified by:
      calculateMinMax in class AxesChartSeries
    • getXData

      public double[] getXData()
    • getOpenData

      public double[] getOpenData()
    • getHighData

      public double[] getHighData()
    • getLowData

      public double[] getLowData()
    • getCloseData

      public double[] getCloseData()
    • getVolumeData

      public long[] getVolumeData()
    • getYData

      public double[] getYData()