From: Vikram R. <vr...@st...> - 2003-05-14 12:17:46
|
If I use the dataAxisProperties.setUsePercentSigns() to set the percent = signs on the data axis, I always get the format of the labels as 10.00%, = 20.00%, which is not really what the developer would want in normal = cases. I am using a user-defined scale here. A snapshot of the code ... DataAxisProperties dataAxisProperties =3D (DataAxisProperties) = axisProperties.getYAxisProperties(); dataAxisProperties.setUsePercentSigns(true); dataAxisProperties.setNumItems(20); dataAxisProperties.setUserDefinedScale(0, 0.1); dataAxisProperties.setRoundToNearest( -2 ); I looked into the code for the NumericTagGroup and found the lines that = were causing it (lines 118 to 129). Reproduced the code below. //---TRIM OFF DECIMAL PLACES IF ROUND TO WHOLE NUMBER if( roundingPowerOfTen >=3D 0 ) { numberFormat.setMaximumFractionDigits( 0 ); numberFormat.setMinimumFractionDigits( 0 ); } else { numberFormat.setMaximumFractionDigits( -roundingPowerOfTen ); numberFormat.setMinimumFractionDigits( -roundingPowerOfTen ); } What I suggest is that we change the minimum fraction digits to be zero = when the rounding power of ten is less than zero. This will ensure that = if the computed increment is a whole number, the data axis labels will = not be displayed as fractions. Nathan, what do you think? - Vikram Rajan |