From: Chris M. <ki...@us...> - 2004-07-01 01:43:44
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/chartData/processors In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8462/src/java/org/krysalis/jcharts/chartData/processors Modified Files: AxisChartDataProcessor.java Log Message: Dual Y axis changes, add support for min and max RHS values Index: AxisChartDataProcessor.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/chartData/processors/AxisChartDataProcessor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AxisChartDataProcessor.java 8 Aug 2003 08:51:27 -0000 1.2 --- AxisChartDataProcessor.java 1 Jul 2004 01:43:35 -0000 1.3 *************** *** 69,72 **** --- 69,75 ---- private double min; + private double rightMax; + private double rightMin; + //private TextLayout titleTextLayout; *************** *** 150,153 **** --- 153,159 ---- IAxisPlotDataSet iAxisPlotDataSet; Iterator iterator = iDataSeries.getIAxisPlotDataSetIterator(); + + double tempMin = 0.0d; + double tempMax = 0.0d; //LOOP *************** *** 156,159 **** --- 162,173 ---- iAxisPlotDataSet = ( IAxisPlotDataSet ) iterator.next(); + if ( iAxisPlotDataSet.getPlotAgainstRHS() ) { + // save the min and max values for restoration later on + tempMin = this.getMinValue(); + tempMax = this.getMaxValue(); + this.setMinValue(0.0d); + this.setMaxValue(0.0d); + } + if( iAxisPlotDataSet.getChartType().isStacked() ) { *************** *** 174,177 **** --- 188,199 ---- } } + if ( iAxisPlotDataSet.getPlotAgainstRHS() ) { + // set the RHS min and max values and restore the current LHS values + this.setRightMinValue(min); + this.setRightMaxValue(max); + this.setMinValue(tempMin); + this.setMaxValue(tempMax); + } + } } *************** *** 187,190 **** --- 209,221 ---- } + /****************************************************************************************** + * + * + ******************************************************************************************/ + void setRightMaxValue( double max ) + { + this.rightMax = max; + } + /****************************************************************************************** *************** *** 198,201 **** --- 229,242 ---- } + /****************************************************************************************** + * + * + * + ******************************************************************************************/ + public double getRightMaxValue() + { + return this.rightMax; + } + /****************************************************************************************** *************** *** 212,215 **** --- 253,266 ---- * * + ******************************************************************************************/ + void setRightMinValue( double min ) + { + this.rightMin = min; + } + + + /****************************************************************************************** + * + * * ******************************************************************************************/ *************** *** 219,222 **** --- 270,283 ---- } + /****************************************************************************************** + * + * + * + ******************************************************************************************/ + public double getRightMinValue() + { + return this.rightMin; + } + public int getNumberOfElementsInADataSet() |