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?
Asked
Active
Viewed 5,131 times
4

user7291698
- 1,972
- 2
- 15
- 30

ajkush
- 587
- 2
- 11
- 25
2 Answers
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
.
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