gr4nt4 Posted July 3, 2007 Share Posted July 3, 2007 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 More sharing options...
szaharia Posted July 3, 2007 Share Posted July 3, 2007 Hi, Could you post a sample which can reproduce this behaviour? It would be very useful in determining the original cause of this problem. Thanks,sanda Link to comment Share on other sites More sharing options...
gr4nt4 Posted July 3, 2007 Author Share Posted July 3, 2007 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 More sharing options...
szaharia Posted July 4, 2007 Share Posted July 4, 2007 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now