Reputation: 33
Can any one help me to know how to draw a rotated ellipse using Ellipse.2D
shape annotation with a given angle in JFreeChart
?
Upvotes: 1
Views: 539
Reputation: 205785
Given an XYPlot
in jfreechart, you can
Add an XYShapeAnnotation
to the plot, as shown here and here.
Invoke setBaseShape()
on the plot's renderer, as shown here, to change the shape for a whole series.
Override getItemShape()
in the plot's renderer, as shown here, to change an individual shape.
In any case, you can rotate the Shape
using the createTransformedShape()
method of AffineTransform
, as shown here.
Upvotes: 1