JFreeChart Legend Display
Posted
by
Richard B
on Stack Overflow
See other posts from Stack Overflow
or by Richard B
Published on 2012-08-31T21:15:02Z
Indexed on
2012/08/31
21:38 UTC
Read the original article
Hit count: 361
In my JFreeChart timeseries plots I find the legends lines to thin to see the colour accurately. Another post [ jfreechart - change sample of colors in legend ] suggested overriding a renderer method as follows:
renderer = new XYLineAndShapeRenderer()
{
private static final long serialVersionUID = 1L;
public Shape lookupLegendShape(int series)
{
return new Rectangle(15, 15);
}
};
this approach works fine until you do what I did
renderer.setSeriesShapesVisible(i, false);
Once I did that the legend reverts back to a line. Is there any way round this?
© Stack Overflow or respective owner