Jump to content

Recommended Posts

Posted

I am working on a jasper report and I am generating a bar chart. 

What I generated using ireport designer and customizer(to show labels) is:

BarChart.PNG.00580d54f2afabb5652b9fa9629c33eb.PNG

Here I want to show the labels outside the bars. How can i do it? Is there any way using customizer?

Also for second bar because of small size label is not visible, in this case what can I do?

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • Solution
Posted

I got the solution :)

In my customizer class I am adding following lines:

CategoryPlot categoryPlot = (CategoryPlot) chart.getPlot();
categoryPlot.getRenderer().setBasePositiveItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.OUTSIDE12, TextAnchor.BOTTOM_CENTER));

Its working :)

  • 1 year later...
Posted

 

I have the other issue that in 2D bar chart which can not display negative value on top of the bar. Do you know what is the reason? How can I solve it?

/sites/default/files/images/Capture(54).PNG

  • 4 years later...

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