Hi,
Could someone please suggest what can I do so that the data point labels are fully displayed. The data point labels at the top are only half displayed. Their upper part is invisible. This is happening only for the data point labels at the top.
Thanks.
Truncating data point label
Re: Truncating data point label
Currently the auto-range calculation for the axis only looks at the data, it doesn't know that the renderer is drawing labels for the data point.
One thing you can do is set a bigger margin at the top of the axis, something like this:
CategoryPlot plot = myChart.getCategoryPlot();
ValueAxis rangeAxis = plot.getRangeAxis();
rangeAxis.setUpperMargin(0.10); // set the margin to 10%
The default upper margin is five percent, increasing it will leave more room for the labels.
Regards,
DG.
One thing you can do is set a bigger margin at the top of the axis, something like this:
CategoryPlot plot = myChart.getCategoryPlot();
ValueAxis rangeAxis = plot.getRangeAxis();
rangeAxis.setUpperMargin(0.10); // set the margin to 10%
The default upper margin is five percent, increasing it will leave more room for the labels.
Regards,
DG.
Re: Truncating data point label
Thanks. by increasing the upper margin to 0.14, I am able to display the labels properly.