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,972
  • 2
  • 15
  • 30
ajkush
  • 587
  • 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
  • 203,806
  • 29
  • 246
  • 1,045
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,286
  • 1
  • 24
  • 41