I am creating a pie chart and adding it to the pdf document. I create a pie chart from ChartFactory class and I try to change (reduce the font size) the Legend text font like :
LegendTitle legendTitle=piechart.getLegend();
legendTitle.setItemFont(new Font("TimesNewRoman", Font.PLAIN,

plot.setLegendItemShape(Plot.DEFAULT_LEGEND_ITEM_BOX);
The pie chart object becomes null and does not print. I get a null pointer exception. Please let me know if you have any idea about this.
Thanks in Advance.
Deepak