I am using JFreeChart to render a stacked area chart. By default, the chart legend is rendered below the plot with the elements laid out horizontally. I would like the legend to
Here is the equivalent for older versions:
StandardLegend legend = new StandardLegend();
legend.setPreferredWidth(100);
legend.setAnchor(Legend.EAST);
jfreechart.setLegend(legend);
A little more time examining the API would have given me the answer:
LegendTitle legend = chart.getLegend();
legend.setPosition(RectangleEdge.RIGHT);