How to use shapes to distinguish the lines

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
pramod

How to use shapes to distinguish the lines

Post by pramod » Fri Jan 03, 2003 9:15 pm

I want to display different shapes like triangle, square, circle with different colors in each to distinguish the lines in a line plot , i tried through


CategoryItemRenderer catItemRender=plot.getRenderer();

catItemRender.getLegendItem(1).setShape(new Ellipse2D.Double(200d,200d,200d,200d));

in the LegendItem class i implemented the setter and getter methods for shape.

but it is not working

can you please help me
Thanks
Pramod

David Gilbert

Re: How to use shapes to distinguish the lines

Post by David Gilbert » Tue Jan 07, 2003 12:19 pm

Hi Pramod,

You should create a new LineAndShapeRenderer that draws both shapes and lines, the use the setRenderer(...) method in the plot class.

The code for shapes is being worked on, it needs to be easier to use.

Regards,

Dave Gilbert

Locked