Monday, April 20, 2009

JFreeChart Item Rendering

So, it seems that the only way built into JFreeChart to render lines is one segment at a time, rather than making it all into one path.

And yes, this can make a different when you, say, have dashed lines with many points along the way. Thick lines can also make certain end/join types cause trouble. (Sorry, too lazy to put up example pictures at the moment.)

Is there any way to make it draw a whole line at once?


  1. If you are using XYLineAndShapeRenderer, call setDrawSeriesLineAsPath(true).

    Best regards,

    Dave Gilbert
    JFreeChart Project Leader

  2. Very responsive. Wow, thanks much.