X-axis label not getting fully displayed

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
ponic
Posts: 28
Joined: Thu Aug 04, 2005 7:32 pm

X-axis label not getting fully displayed

Post by ponic » Sat Oct 22, 2005 4:31 pm

Hello,

I have labels on X-axis and becuase the length is long, it is not getting full displayed, how can I solve this problem. Pasted below is my code.

Any help is highly appreciable.

Thanks

*** JSP ******

CategoryAxis categoryAxis = new CategoryAxis("Site");
ValueAxis valueAxis = new NumberAxis("Value");
StackedBarRenderer3D rend = new StackedBarRenderer3D();
StandardCategoryToolTipGenerator tt = new StandardCategoryToolTipGenerator();
rend.setItemURLGenerator(new StandardCategoryURLGenerator("xy_chart.jsp","series","section"));
rend.setToolTipGenerator(new StandardCategoryToolTipGenerator());
CategoryPlot plot = new CategoryPlot(data, categoryAxis, valueAxis, rend);
categoryAxis = plot.getDomainAxis();
categoryAxis.setCategoryLabelPositions(
CategoryLabelPositions.createUpRotationLabelPositions(Math.PI / 10.0));

JFreeChart chart = ChartFactory.createStackedBarChart3D(
null, // chart title
"Site",
"Value",
data, // data
PlotOrientation.VERTICAL, // orientation
true, // include legend
true,
true
);

Locked