From: <ki...@us...> - 2003-08-28 01:52:33
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/axisChart In directory sc8-pr-cvs1:/tmp/cvs-serv28627/axisChart Modified Files: AxisChart.java Log Message: Fixed rounding problem in right hand axis label creation code. Index: AxisChart.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/axisChart/AxisChart.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AxisChart.java 27 Aug 2003 04:37:44 -0000 1.4 --- AxisChart.java 28 Aug 2003 01:52:30 -0000 1.5 *************** *** 320,326 **** Float myFloat = new Float (this.yAxis.getAxisLabelsGroup().getTextTag(j).getText()); float temp = myFloat.floatValue(); ! Integer myInteger = new Integer ( Math.round(Math.round((float)(temp / this.axisProperties.getYAxisProperties().getSecondScaleRight()))/10)*10 ); ! String myString = new String (""); ! myString = myInteger.toString(); numericTagGroup2.addLabel(myString); j++; --- 320,328 ---- Float myFloat = new Float (this.yAxis.getAxisLabelsGroup().getTextTag(j).getText()); float temp = myFloat.floatValue(); ! // Rounding problems were causing errors ! //Integer myInteger = new Integer ( Math.round(Math.round((float)(temp / this.axisProperties.getYAxisProperties().getSecondScaleRight()))/10)*10 ); ! //String myString = new String (""); ! //myString = myInteger.toString(); ! String myString = new String (String.valueOf(Math.round(temp / (float)this.axisProperties.getYAxisProperties().getSecondScaleRight())) ); numericTagGroup2.addLabel(myString); j++; |