code: private OHLCSeries addSeries(
        String seriesName,
        double[] xData,
        double[] openData,
        double[] highData,
        double[] lowData,
        double[] closeData,
        DataType dataType) {
  
      if (seriesMap.keySet().contains(seriesName)) {
        throw new IllegalArgumentException(
            "Series name >"
                + seriesName
                + "< has already been used. Use unique names for each series!!!");
      }
  
      // Sanity checks
      sanityCheck(seriesName, openData, highData, lowData, closeData);
  
      final double[] xDataToUse;
      if (xData != null) {
        // Sanity check
        checkDataLengths(seriesName, "X-Axis", "Close", xData, closeData);
  
        xDataToUse = xData;
      } else { // generate xData
        xDataToUse = Utils.getGeneratedDataAsArray(closeData.length);
      }
      OHLCSeries series =
          new OHLCSeries(seriesName, xDataToUse, openData, highData, lowData, closeData, dataType);
      ;
  
      seriesMap.put(seriesName, series);
  
      return series;
    }
docs: Add a series for a OHLC type chart
  
  @param seriesName
  @param xData the x-axis data
  @param openData the open data
  @param highData the high data
  @param lowData the low data
  @param closeData the close data
  @return A Series object that you can set properties on