/** * Adds a data series into the series collection. Vector <TT>data</TT> represents * a point set. Only <SPAN CLASS="textit">the first</SPAN> <TT>numPoints</TT> of * <TT>data</TT> will be added to the new series. * * @param data Point set * * @param numPoints Number of points to add * * @return Integer that represent the new point set's position in the JFreeChart <TT>DefaultBoxAndWhiskerXYDataset</TT> object. * */ public int add (double[] data, int numPoints) { DefaultBoxAndWhiskerCategoryDataset tempSeriesCollection = (DefaultBoxAndWhiskerCategoryDataset)seriesCollection; final List<Double> list = new ArrayList<Double>(); for (int i = 0; i < numPoints; i ++) list.add(data[i]); int count = tempSeriesCollection.getColumnCount(); tempSeriesCollection.add(list, 0, "Serie " + count); return count; }
this.maximumRangeValueColumn = -1; int rowCount = getRowCount(); int columnCount = getColumnCount(); for (int r = 0; r < rowCount; r++) { for (int c = 0; c < columnCount; c++) {
this.maximumRangeValueColumn = -1; int rowCount = getRowCount(); int columnCount = getColumnCount(); for (int r = 0; r < rowCount; r++) { for (int c = 0; c < columnCount; c++) {
/** * Returns the range (<SPAN CLASS="MATH"><I>y</I></SPAN>-coordinates) min and max values. * * @return range min and max values. * */ public double[] getRangeBounds() { double max=0, min=0; DefaultBoxAndWhiskerCategoryDataset tempSeriesCollection = (DefaultBoxAndWhiskerCategoryDataset)seriesCollection; if(tempSeriesCollection.getColumnCount() != 0 && tempSeriesCollection.getRowCount() != 0) { max = tempSeriesCollection.getItem(0, 0).getMaxOutlier().doubleValue() ; min = tempSeriesCollection.getItem(0, 0).getMinOutlier().doubleValue() ; } for(int i = 0; i < tempSeriesCollection.getRowCount(); i++) { for( int j = 0; j < tempSeriesCollection.getColumnCount(); j++) { max = Math.max(max, tempSeriesCollection.getItem(i, j).getMaxOutlier().doubleValue() ); min = Math.min(min, tempSeriesCollection.getItem(i, j).getMinOutlier().doubleValue() ); } } double[] retour = {min, max}; return retour; }