bob007 Posted May 1, 2009 Share Posted May 1, 2009 Hi, How to show only integers values in the value axe of bar chart. (no decimals )ex: I want 0, 1, 2, 3, 4, 5 instead of 0, 0.5, 1, 1.5, 2, 2.5 Thank you,Post Edited by bob007 at 05/01/2009 16:59 Link to comment Share on other sites More sharing options...
lucianc Posted May 5, 2009 Share Posted May 5, 2009 Set a mask for the value axis labels.HTH,Lucian Code: Link to comment Share on other sites More sharing options...
lucianc Posted May 5, 2009 Share Posted May 5, 2009 Like this: <barPlot> <plot/> <valueAxisFormat> <axisFormat tickLabelMask="#"/> </valueAxisFormat> </barPlot> Link to comment Share on other sites More sharing options...
dtrobert Posted July 14, 2009 Share Posted July 14, 2009 Hey, I did this but now get repeated integers like 0 0 1 1 2 2 3 3 Is there a way to fix that as well? Link to comment Share on other sites More sharing options...
szaharia Posted July 16, 2009 Share Posted July 16, 2009 Apparently you need to have less tick marks on your axis.In order to do that, you'll need iReport v3.1.4 or later. There are 2 possibilities to solve your problem: set the custom net.sf.jasperreports.chart.domain.axis.tick.interval and/or net.sf.jasperreports.chart.range.axis.tick.interval element properties to a numeric value representing the desired numeric interval between 2 consecutive tick marks on that axis. set the custom net.sf.jasperreports.chart.domain.axis.tick.count and/or net.sf.jasperreports.chart.range.axis.tick.count element properties to an integer value representing the desired number of ticks on that axis.For more information, seehttp://jasperreports.sourceforge.net/config.reference.html?group_id=252#net.sf.jasperreports.chart.domain.axis.tick.countHope this helps,sanda Post Edited by shertage at 07/16/2009 13:16 Link to comment Share on other sites More sharing options...
kolja.ehlersiconplc.com Posted September 18, 2009 Share Posted September 18, 2009 I am having the same problem to display only integer values on the axis. Where do I set those properties? Also I see a "Range Axis Max Value Expression" when will this be evaluated? Can I set it to a value which is my max value + x? Thanks Link to comment Share on other sites More sharing options...
lucianc Posted September 22, 2009 Share Posted September 22, 2009 kehlersWrote: I am having the same problem to display only integer values on the axis. Where do I set those properties? Also I see a "Range Axis Max Value Expression" when will this be evaluated? Can I set it to a value which is my max value + x? Thanks These are custom report element properties, and are set in JRXML as below.The range max value expression is evaluated at the moment given by the chart's evaluation time.Regards,LucianCode:<barChart> <chart evaluationTime=".."> <reportElement ..> <property name="net.sf.jasperreports.chart.range.axis.tick.interval" value="10"/> </reportElement> </chart> .. Link to comment Share on other sites More sharing options...
teamireport Posted October 16, 2009 Share Posted October 16, 2009 Thanks a lot !! This topic helped my requirement Link to comment Share on other sites More sharing options...
pathfinder2104.work Posted July 31, 2014 Share Posted July 31, 2014 Any solution to this problem ??? Has anyone solved it ?? I have tried setting these properties from my code but its not working. parameters.put(DefaultChartTheme.PROPERTY_RANGE_AXIS_INTEGER_UNIT, true); parameters.put(DefaultChartTheme.PROPERTY_DOMAIN_AXIS_TICK_INTERVAL, 10);Anything is missing ??? or Am I forgetting anything?? I have assumed that these parameters will be already there in Jasper (or Do I need to create them ??!!). Link to comment Share on other sites More sharing options...
pathfinder2104.work Posted July 31, 2014 Share Posted July 31, 2014 PS Posting here because someone has spammed me so I can't post anymore questions please help. Link to comment Share on other sites More sharing options...
gthompson Posted July 31, 2014 Share Posted July 31, 2014 net.sf.jasperreports.chart.range.axis.integer.unitFlag property enabling the JFreeCharts engine to use integer tick units on a range value axis. If set to true, it will take precedence over the net.sf.jasperreports.chart.range.axis.tick.interval and net.sf.jasperreports.chart.range.axis.tick.count properties. 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