How to set my own color in JFreeChart without enlarged joints?

Some alternatives:

  • Obtain a reference to your chosen chart factory’s existing renderer and invoke setDefaultShapesVisible(false) explicitly:

    XYPlot plot=(XYPlot)chart.getPlot();
    XYLineAndShapeRenderer r = (XYLineAndShapeRenderer) plot.getRenderer();
  • Create your own factory, as shown here, using the original as a guide. Note the factory already specifies that lines should be visible, but not shapes.

    XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer(true, false);


CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top