4

In JFreeChart XYSplineRenderer Graph I need to display small dots instead of small squares to display XY coordinates. How can I change the shape of these dots? enter image description here

user7291698
  • 1,743
  • 2
  • 12
  • 30
ajkush
  • 547
  • 2
  • 11
  • 25

2 Answers2

3

To center a symmetric Shape over a given data point, you'll want to offset the top-left corner by the radius (half the diameter). For smaller dots,

setSeriesShape(0, new Ellipse2D.Double(-3, -3, 6, 6));

See also this related example using ShapeUtilities.

Community
  • 1
  • 1
trashgod
  • 200,320
  • 28
  • 229
  • 974
1

Use the setBaseShape method inherited from AbstractRenderer. Or you can use setSeriesShape

setBaseShape(new Ellipse2D.Float(100.0f, 100.0f, 100.0f, 100.0f));
BeRecursive
  • 6,146
  • 1
  • 22
  • 40