double[] errdata = new double[] { 50, 20, 10, 50, 40, 20, 10 };
double[] yData2 = new double[] { 50, 80, 90, 0, 10, 30, 40 };
double[] yData3 = new double[] { 150, 120, 110, 100, 90, 70, 60 };
Chart mychart = new Chart(900, 700);
mychart.getStyleManager().setYAxisMin(0);
mychart.getStyleManager().setYAxisMax(150);
mychart.getStyleManager().setErrorBarsColor(Color.black);
Series series1 = mychart.addSeries("Error bar test data", xData, yData1, errdata);
Series series2 = mychart.addSeries("Y+error", xData, yData2);
Series series3 = mychart.addSeries("Y-error", xData, yData3);
series1.setLineStyle(SeriesLineStyle.SOLID);
series1.setMarker(SeriesMarker.DIAMOND);
series1.setMarkerColor(Color.MAGENTA);
series2.setLineStyle(SeriesLineStyle.DASH_DASH);
series2.setMarker(SeriesMarker.NONE);