Disable gradient for legend items

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
znakeeye
Newbie
Newbie
Posts: 44
Joined: Mon Jan 07, 2013 12:00 am

Disable gradient for legend items

Post by znakeeye » Sun Mar 24, 2013 5:04 pm

I have bars with gradients from e.g. white to yellow. In my legend, I don't want this gradient.
It makes sense to simply use the second color (yellow) for the small squares.

How do you disable the gradients for legend items?

I tried cloning the chart's first series (to be set for the legend) and modifying it, but that modifies the original series (i.e. the bars)! Please help!

Yeray
Site Admin
Site Admin
Posts: 9514
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Disable gradient for legend items

Post by Yeray » Tue Mar 26, 2013 11:39 am

Hi,

You can have hide the series from the legend with setShowInLegend(false). Then, you could add as many "dummy" series as you want to show in the legend, and set them to show the gradient you wish.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply