Sign in to follow this  
jarnott

Dont want to show decimal in axis

Recommended Posts

In paid V3 ...

 

 

 


<chart caption="" subCaption="" animation="1" showLegend="1" chartRightMargin="20" labelDisplay="WRAP"

showValues="0" decimals="3">

<categories><category label="Volume" /></categories>

<dataSet seriesName="Count 1"><set value="1.0" showValue="0" /></dataSet>

<dataSet seriesName="Count 2"><set value="1.0" showValue="0"/></dataSet>

<styles><definition /><application /></styles>

</chart>

 

 

 

MSBar2D.swf

 

 

 

In my x axis I see 0 .3 .6 .9 .2 .5

 

 

 

I only want whole number values on my axis.

 

I'd like to just see at the most 0 1 2 (in this chart) x axis labels, since this is a count.

 

 

 

 

 

What settings do I need?

 

Tried adjustDiv='0' xAxisValueDecimals='0' and that made it worse.

 

 

 

thanks,

 

jim

Edited by Guest

Share this post


Link to post
Share on other sites

Hi,

 

 

 

Since your data is between 0 and 1, the divlines can only be 0 and 1. As such, you can set

 

 

 

adjustDiv='0' yAxisValueDecimals='0' numDivLines='0'

Share this post


Link to post
Share on other sites

Nope, shows 0 and 1.1 on my axis not 0 and 1 or 0 1 2.

 

 

 

The the bar falls ominously short of the 1.1 line/end leaving the view to guess its value.

 

 

 

And of course this is only one scenario, the values could be 1 and 2 or 1, 2 and 3 the combinations are almost endless. Do I really have to code around small numbers, by specifying how many dividers I want? This should be automatic.

 

 

 

In JFreeChart I can specify a hint on where the lines end up ie: 1,2,5,10,20,50,100,150,200,500,1000,2000,5000,10000.

 

That would be a nice feature here.

 

 

 

Any other confirmed work around?

 

 

 

thanks again,

 

jim

Share this post


Link to post
Share on other sites
Pallav (12/21/2007)
Hi,

 

 

 

Since your data is between 0 and 1, the divlines can only be 0 and 1. As such, you can set

 

 

 

adjustDiv='0' yAxisValueDecimals='0' numDivLines='0'

 

 

 

BTW, I assume you mean xAxisValueDecimals='0' because when I use yAxisValueDecimals='0' my

 

1.1 rounds down to 1 and shows 1 and the axis (yea), however the bars still end up where 1 should be, looking like they are at .9 (boo).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this