1

How to set such kind of points - small circles? I know we should set render and ShapeUtilies:

render.setSeriesShape(NumberOfSerie, ShapeUtilities.[something here]);

what should i write to get this circles? Documentation is here.

enter image description here

Denis
  • 503
  • 8
  • 32

1 Answers1

3

The ShapeUtilities class has some methods to create shapes that aren't provided by default in Java2D. For circles though, you can just use:

Ellipse2D circle = new Ellipse2D.Double(-3.0, -3.0, 6.0, 6.0);

The circle here is centered on (0, 0) - JFreeChart relies on that because it will translate the position of the shape to (x, y) when drawing the chart.

David Gilbert
  • 4,427
  • 14
  • 22
  • yes, `render.setSeriesShape(j, new Ellipse2D.Double(-2.0, -2.0, 4.0, 4.0));` is works, thank you! – Denis Apr 25 '14 at 13:42