PDA

View Full Version : Show legends in "Advanced Charts" example



borisperezg
27 Aug 2010, 8:12 AM
Hi there.

I have a problem, I need to show legends in my BarChart chart. I followed Advanced Charts example exactly which comes in Ext GWT 2.1.1. Explorer, but it doesnot come with it. How can I show it ?

I attach an image to explain my problem.

http://www.imageno.com/thumbs/20100827/sdqcah686s6b.jpg (http://www.imageno.com/sdqcah686s6bpic.html)

Thanks for readme :D

sven
27 Aug 2010, 8:42 AM
You can do that.

Change
model.setLegend(new Legend(Position.TOP, true)); to
model.setLegend(new Legend(Position.RIGHT, true));

And for each bar, you need to add


bar.setText("Legend");

sven
27 Aug 2010, 8:44 AM
It will look like this http://www.svenbrunken.de/images/screenshots/SS-2010.08.27-18.43.50.png in the end

borisperezg
27 Aug 2010, 8:54 AM
Hey Sven... thanks a lot... It works perfectly. I owe you a beer :D