Legent with shapes

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

Legent with shapes

Post by pramod » Fri Jan 10, 2003 10:21 pm

Hi
i got different shapes for lines using LineAndShapeRenderer,
but i cannot get the same shape for the legend .
The Legend shapes should be same shape we get for the Lines

What is the use of StandardLegend how can i use StandardLegend
class to do this, or do i have to subclass Legend and do this
thanks
Pramod

David Gilbert

Re: Legent with shapes

Post by David Gilbert » Fri Jan 10, 2003 10:25 pm

Hi Pramod,

The current legend implementation doesn't take account of the shapes on the chart. In the next release I hope to have this cleared up.

Regards,

Dave Gilbert

pramod

Re: Legent with shapes

Post by pramod » Thu Jan 16, 2003 8:46 pm

i just tried

getChart().getPlot().getShapeFactory().getShape(i,null,xloc,yloc,lineHeight*0.7f);
in StandardLegend class.

to get shapes in the legend



Thanks
Pramod

Yu

Re: Legent with shapes

Post by Yu » Wed Feb 05, 2003 7:26 pm

Pramod,

Can you show me the example code how to use this trick in a line chcart?

Thanks,
Yu

David Gilbert

Re: Legent with shapes

Post by David Gilbert » Thu Feb 06, 2003 4:57 pm

0.9.5 is now released, and the StandardLegend class has the ability to display shapes that correspond to the series in the chart.

Regards,

Dave Gilbert

Locked