Babu R
Babu R

Reputation: 1035

How to set Shape for particular value on line chart in jfreechart?

Hi i am new to jfreechart. I want to display the shape to the particular value on the linechart. I used setSeriesShapesVisible() method , but it displays shapes for all data points.

How to draw shape for particular value in line chart? Bz i want to draw the shapes for only max and min values in the linechart.

Please help me..

Thanks in advance..

Upvotes: 1

Views: 1279

Answers (2)

trashgod
trashgod

Reputation: 205785

Can you please give me some example for how to use XYShapeAnnotation class?

Yes, several example are discussed here.

Upvotes: 2

Baldrick
Baldrick

Reputation: 24340

You can achieve this with XYShapeAnnotation (check the others subclasses of AbstractXYAnnotation, maybe there is one that suits you more). Create a new annotation, and add it to your plot with XYPlot.addAnnotation

Upvotes: 1

Related Questions