diff --git a/chart/org.eclipse.birt.chart.device.svg/src/org/eclipse/birt/chart/device/svg/SVGGraphics2D.java b/chart/org.eclipse.birt.chart.device.svg/src/org/eclipse/birt/chart/device/svg/SVGGraphics2D.java index b8676c650d4..4ae95d7d77d 100644 --- a/chart/org.eclipse.birt.chart.device.svg/src/org/eclipse/birt/chart/device/svg/SVGGraphics2D.java +++ b/chart/org.eclipse.birt.chart.device.svg/src/org/eclipse/birt/chart/device/svg/SVGGraphics2D.java @@ -1508,7 +1508,7 @@ protected Element createShape( Shape shape ) StringBuffer pathStr = new StringBuffer( ); while ( !pathIter.isDone( ) ) { - double[] points = new double[6]; + float[] points = new float[6]; int TYPE = pathIter.currentSegment( points ); switch ( TYPE ) { @@ -1962,4 +1962,27 @@ static String toString( double[] v, int length, char separator ) } return buffer.toString( ); } + + static String toString( float[] v, int length, char separator ) + { + if ( v.length == 0 ) + { + return ""; //$NON-NLS-1$ + } + if ( v.length == 1 ) + { + return toString( v[0] ); + } + if ( length > v.length ) + { + length = v.length; + } + StringBuffer buffer = new StringBuffer( toString( v[0] ) ); + for ( int i = 1; i < length; i++ ) + { + buffer.append( separator ); + buffer.append( toString( v[i] ) ); + } + return buffer.toString( ); + } } diff --git a/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/render/AxesRenderHelper.java b/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/render/AxesRenderHelper.java index 327c56eed69..ff304ddf2f3 100644 --- a/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/render/AxesRenderHelper.java +++ b/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/render/AxesRenderHelper.java @@ -740,7 +740,7 @@ private List renderVerticalAxisTickLabels( ComputationContext c computation.handlePreEachTick( i ); double y = da.getCoordinate( i ); - boolean bSkipTickLine = ChartUtil.mathEqual( yLast, y ); + boolean bSkipTickLine = ( Math.abs( yLast - y ) < 1 ); if ( !bSkipTickLine ) { yLast = y; @@ -1039,7 +1039,7 @@ private List renderHorizontalAxisTickLabels( ComputationContex double x = da.getCoordinate( i ); - boolean bSkipTickLine = ChartUtil.mathEqual( x, xLast ); + boolean bSkipTickLine = ( Math.abs( x - xLast ) < 1 ); if ( !bSkipTickLine ) { xLast = x;