double[][] proj_req_values = calculateShortfallValues(projectedDueOutScheduleSeries,
double[][] proj_req_out_values = calculateShortfallValues(projectedDueOutScheduleSeries,
  private void setValues() {    if (valuesSet)      return;    valuesSet = true;    // there's no actual or requested data    if (maxSeries == 0)       return;    // compare actual due-in to requested due-in and    // actual due-out to requested due-out    int actualDueInScheduleSeries = -1;    int unconfirmedDueInScheduleSeries = -1;    int actualDueOutScheduleSeries = -1;    int requestedDueInScheduleSeries = -1;    int requestedDueOutScheduleSeries = -1;    int projectedDueOutScheduleSeries = -1;    int requestedProjectedDueOutScheduleSeries = -1;    String[] actualLabels =       ((LabelledChartDataModel)actual).getSeriesLabels();    String[] requestedLabels =       ((LabelledChartDataModel)requested).getSeriesLabels();    for (int i = 0; i < actualLabels.length; i++) {      if (actualLabels[i].equals(InventoryChartDataModel.ACTUAL_DUE_IN_LABEL))         actualDueInScheduleSeries = i;      else if (actualLabels[i].equals(InventoryChartDataModel.ACTUAL_DUE_OUT_SHIPPED_LABEL) ||               actualLabels[i].equals(InventoryChartDataModel.ACTUAL_DUE_OUT_CONSUMED_LABEL))        actualDueOutScheduleSeries = i;      else if (actualLabels[i].equals(InventoryChartDataModel.ACTUAL_PROJECTED_DUE_OUT_SHIPPED_LABEL) ||               actualLabels[i].equals(InventoryChartDataModel.ACTUAL_PROJECTED_DUE_OUT_CONSUMED_LABEL))	  projectedDueOutScheduleSeries = i;      else	    System.out.println("InventoryShortfallChartDataModel ERROR actualLabel not recognized <"+			       actualLabels[i]+">");    }    for (int i = 0; i < requestedLabels.length; i++) {      if (requestedLabels[i].equals(InventoryChartDataModel.REQUESTED_DUE_IN_LABEL))	requestedDueInScheduleSeries = i;      else if (requestedLabels[i].equals(InventoryChartDataModel.REQUESTED_DUE_OUT_LABEL))        requestedDueOutScheduleSeries = i;      else if (requestedLabels[i].equals(InventoryChartDataModel.REQUESTED_PROJECTED_DUE_OUT_LABEL))        requestedProjectedDueOutScheduleSeries = i;      else	  System.out.println("InventoryShortfallChartDataModel ERROR requestedLabel not recognized <"+			     requestedLabels[i]+">");    }        if (unconfirmed != null) {	String[] unconfirmedLabels = 	    ((LabelledChartDataModel)unconfirmed).getSeriesLabels();		for (int i = 0; i < unconfirmedLabels.length; i++) {	    if (unconfirmedLabels[i].equals(InventoryChartDataModel.UNCONFIRMED_DUE_IN_LABEL)) {		unconfirmedDueInScheduleSeries = i;		nSeries = 3;	    } else 		System.out.println("InventoryShortfallChartDataModel ERROR unconfirmedlLabel not recognized <"+				   unconfirmedLabels[i]+">");	}    }    xvalues = new double[maxSeries][];    yvalues = new double[maxSeries][];    seriesLabels = new String[maxSeries];    nSeries = 0;    double[][] restock_values = calculateShortfallValues(actualDueInScheduleSeries, 					requestedDueInScheduleSeries);    if ((restock_values[0] != null) && (restock_values[0].length > 0)) {	if (unconfirmedDueInScheduleSeries == -1) {	    // no unconfirmed - all shortfall due to known failure	    seriesLabels[nSeries] = CONFIRMED_DUE_IN_SHORTFALL_LABEL;	} else {	    // some shortfall due to no allocation result	    seriesLabels[nSeries] = UNCONFIRMED_DUE_IN_SHORTFALL_LABEL;	}	xvalues[nSeries] = restock_values[0];	yvalues[nSeries] = restock_values[1];	nSeries++;    }    double[][] failed_restock_values = calculateFailedRestockValues(unconfirmedDueInScheduleSeries,				  actualDueInScheduleSeries,				  requestedDueInScheduleSeries);    if ((failed_restock_values[0] != null) && (failed_restock_values[0].length > 0)) {	seriesLabels[nSeries] = CONFIRMED_DUE_IN_SHORTFALL_LABEL;	xvalues[nSeries] = failed_restock_values[0];	yvalues[nSeries] = failed_restock_values[1];	nSeries++;    }    double[][] req_values = calculateShortfallValues(actualDueOutScheduleSeries, 						    requestedDueOutScheduleSeries);    if ((req_values[0] != null) && (req_values[0].length > 0)) {	seriesLabels[nSeries] = DUE_OUT_SHORTFALL_LABEL;	xvalues[nSeries] = req_values[0];	yvalues[nSeries] = req_values[1];	nSeries++;    }    double[][] proj_req_values = calculateShortfallValues(projectedDueOutScheduleSeries, 							  requestedProjectedDueOutScheduleSeries);    if ((proj_req_values[0] != null) && (proj_req_values[0].length > 0)) {	seriesLabels[nSeries] = PROJECTED_DUE_OUT_SHORTFALL_LABEL;	xvalues[nSeries] = proj_req_values[0];	yvalues[nSeries] = proj_req_values[1];	nSeries++;    }  }