I would like to change the size of the font in the legend list and also to get bigger color dots so it would be easier to see diffrences of colors.
Any one know how to do this.
/Fredrik
how to change legend size
Fredrik,
Check out the API for legendTitle.
http://www.jfree.org/jfreechart/api/jav ... Title.html
Depending on how you are making your plot the implementation would change. Say, if you were using one of the factories you would just set legend = false in the constructor, manually build your legend, then use the .addLegend in the JFreeChart object
For example,
Check out the API for legendTitle.
http://www.jfree.org/jfreechart/api/jav ... Title.html
Depending on how you are making your plot the implementation would change. Say, if you were using one of the factories you would just set legend = false in the constructor, manually build your legend, then use the .addLegend in the JFreeChart object
For example,
Code: Select all
LegendTitle legend = new LegendTitle('my title');
legend.setMargin(new RectangleInsets(1.0, 1.0, 1.0, 1.0));
legend.setFrame(new LineBorder());
legend.setBackgroundPaint(Color.white);
legend.setPosition(RectangleEdge.BOTTOM);
// more legend options...
chart = ChartFactory.createBarChart(null, categoryAxisLabel,
rangeAxisLabel, dataset, PlotOrientation.HORIZONTAL, false, false, false);
chart.addLegend(legend)