Jump to content

On y-axis of a bar chart, I am getting decimal number in place of whole number.


man_mbt

Recommended Posts

  • Replies 13
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 months later...
  • 11 months later...
  • 3 months later...
  • 3 weeks later...

Same issue, but I'm working on the x-axis with a simple bar chart (iReport 3.7.0)  For some reason, all categor axis label properties are being ignored (font size, font color, tick label mask, vertical tick labels) except rotation.  I was able to display integers on the axis by directly selecting the properties for the source field being displayed on the x-axis and changing it's field class to integer.

The y-axis labels (which are automatically generated) seem to respond to changes in the label properties as expected.

Link to comment
Share on other sites

  • 2 years later...

Making changes to the Value Axis Tick Label Mask property in the Properties view doesn't seem to make any effect. A workaround that worked for me is to edit the XML file directly, see sample below:

 

 

Code:
<linePlot>  <plot labelRotation="-90.0"/>  <valueAxisFormat>    <axisFormat tickLabelMask="#,##0"/>  </valueAxisFormat></linePlot>
Link to comment
Share on other sites

  • 3 weeks later...

HI,

I 've just tried your solution with tick label Mask. Unfortunately for some cases the values returned remain still unadequate. Please have a look  on attached jpg you will see that this solution rounds up the existing 0,5 or ,1,5,  to the following values 0, 2 .

 

 it is recommened to buy a library JFreeChart and then you can customize bar chart very easily

http://mdahlman.wordpress.com/2011/04/17/chart-customizers-2/

 

 

Link to comment
Share on other sites

  • 2 years later...
  • 3 years later...

thanks subashmy, this answer may work but we have all been trapped into not distinguishing between jasper reports via web browser and the jasper studio, MOST posts online do not help by saying which environment is being used. leading to wasted time and frustration all round. yet another classic documention fail, moderrators of this forum shoudl be activley marking each post for jasper report or jasper studio.... but they wont.

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...