java - How can I make a JFreeChart Bar Chart's plot expand to show vertical labels above the bars? -


i want create bar chart, using jfreechart, vertical labels above bars. can using itemlabelpositioner follows:

barrenderer renderer = (barrenderer)plot.getrenderer(); itemlabelposition pout = new itemlabelposition(itemlabelanchor.outside12, textanchor.center_left, textanchor.center_left, -math.pi / 2.0); renderer.setbasepositiveitemlabelposition(pout); 

however, labels on tallest bars go off top of chart. there way can prevent without doing complicated calculations on label sizes , setting upper margin?

you may use :

renderer.setitemlabelanchoroffset(10); //giving margins 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -