Jump to content

Bar Chart Lable Format


gr4nt4

Recommended Posts

Hi

 

I have a bar chart. that uses the expression

 

New Double( $F{TOTAL02}.doubleValue() / $F{GRANDTOTAL}.doubleValue() * 100.0)

 

to get the values of each column shown as a % of the total. However the value returned is to 3 decimal places where I only want to display to 1.

 

I tried the mask values but with no luck

 

Any ideas how I can go about this?

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hi

 

Attached files as requested.

 

many thanks [file name=GraphProblem.jrxml size=5322]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/GraphProblem.jrxml%5B/file] size=335]http://www.jasperforge.org/components/com_joomlaboard/uploaded/images/snap.jpg

Link to comment
Share on other sites

Hi,

 

Thank you for the sample. You're right: there's no mask attribute for the value labels. It can be added, but this means changes through entire chart realm in the application. You could post a feature request here.

Meanwhile, as a workaround to this problem, you could use

Code:
new Double(Math.round(your_value * 100)/100d) in your <valueExpression /> tag.

 

Regards,

sanda

Link to comment
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

×
×
  • Create New...