public XYSeries addSeries(
      String seriesName,
      List<?> xData,
      List<? extends Number> yData,
      List<? extends Number> errorBars) {

    DataType dataType = getDataType(xData);
    switch (dataType) {
      case Date:
        return addSeries(
            seriesName,
            Utils.getDoubleArrayFromDateList(xData),
            Utils.getDoubleArrayFromNumberList(yData),
            Utils.getDoubleArrayFromNumberList(errorBars),
            DataType.Date);

      default:
        return addSeries(
            seriesName,
            Utils.getDoubleArrayFromNumberList(xData),
            Utils.getDoubleArrayFromNumberList(yData),
            Utils.getDoubleArrayFromNumberList(errorBars),
            DataType.Number);
    }
  }
public XYSeries addSeries ( String seriesName , List < ? > xData , List < ? extends Number > yData , List < ? extends Number > errorBars ) { DataType dataType = getDataType ( xData ) ; switch ( dataType ) { case Date : return addSeries ( seriesName , Utils . getDoubleArrayFromDateList ( xData ) , Utils . getDoubleArrayFromNumberList ( yData ) , Utils . getDoubleArrayFromNumberList ( errorBars ) , DataType . Date ) ; default : return addSeries ( seriesName , Utils . getDoubleArrayFromNumberList ( xData ) , Utils . getDoubleArrayFromNumberList ( yData ) , Utils . getDoubleArrayFromNumberList ( errorBars ) , DataType . Number ) ; } }
Add a series for a X-Y type chart using Lists

@param seriesName
@param xData the X-Axis data
@param yData the Y-Axis data
@param errorBars the error bar data
@return A Series object that you can set properties on