Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts
In directory sc8-pr-cvs1:/tmp/cvs-serv23576
Modified Files:
Legend.java
Log Message:
Integration of the Dual Y axis code that was submitted to Nathaniel by
Romain SEGUY.
These are new properties added to the AxisTypeProperties class
ChartFont AxisTypeProperties.getScaleChartFontRight()
void AxisTypeProperties.setScaleChartFontRight( ChartFont scaleChartFontRight )
void AxisTypeProperties.setShowRightAxis( boolean showRightAxis )
float AxisTypeProperties.getSecondScaleRight()
void AxisTypeProperties.setSecondScaleRight(float secondScaleRight)
double AxisTypeProperties.getMinRightAxis()
void AxisTypeProperties.setMinRightAxis(double minRightAxis)
double AxisTypeProperties.getMaxRightAxis()
void AxisTypeProperties.setMaxRightAxis(double maxRightAxis)
Added to Axis class
TextTagGroup Axis.getAxisLabelsGroupRight()
void Axis.setAxisLabelsGroupRight( TextTagGroup axisLabelsGroupRight )
There is a demonstration servlet in org\krysalis\jcharts\demo\simpleservlet
called DualYAxis.java
Index: Legend.java
===================================================================
RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/Legend.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Legend.java 24 Aug 2003 14:47:59 -0000 1.8
--- Legend.java 27 Aug 2003 04:37:44 -0000 1.9
***************
*** 335,341 ****
{
//---get the bounds of the shape
! Double shapeWidthDouble = new Double( ( ( (Shape) this.shapes.get( i ) ).getBounds2D().getWidth() ) );
! float shapeWidth = shapeWidthDouble.floatValue();
! this.iconSide = Math.max(this.iconSide, shapeWidth);
}
}
--- 335,351 ----
{
//---get the bounds of the shape
! try
! {
! Double shapeWidthDouble = new Double( ( ( (Shape) this.shapes.get( i ) ).getBounds2D().getWidth() ) );
! float shapeWidth = shapeWidthDouble.floatValue();
! this.iconSide = Math.max(this.iconSide, shapeWidth);
! }
! catch (NullPointerException npe)
! {
! // Looks like in 0.74 it was quite acceptable to make shape = null
! // we should probably catch all these and render a "null" shape to the legend
! System.err.println("Warning: legend shape is null");
! npe.printStackTrace();
! }
}
}
***************
*** 493,496 ****
--- 503,507 ----
// only Point and Line Charts will have shapes drawn
+
if( this.shapes.size() > 0 && this.shapes.size() > labelIndex )
{
|