Custom Legend Tool - Make background transparent

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Hardee
Newbie
Newbie
Posts: 22
Joined: Tue Nov 21, 2006 12:00 am

Custom Legend Tool - Make background transparent

Post by Hardee » Sat Dec 18, 2010 3:52 am

Hello,

I want to use the Custom Legend Tool but I need to make it, and the string grid in it, transparent. The effect I want is just the text in columns and rows, but have the gridlines, border and background not visible. I have gotten rid of the border and grid lines but still have the background. Is this a limitation with the string grid?

Any help is appreciated. I can post some sample code.

Thanks

Hardee Mahoney
Washington, DC

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Custom Legend Tool - Make background transparent

Post by Sandra » Mon Dec 20, 2010 12:26 pm

Hello Hardee,

If you don't want appear lines in your legends you need put property of legend DivindigLines to false as do in next code example:

Code: Select all

procedure TForm2.FormCreate(Sender: TObject);
var Series1:TBarSeries;
    Series2:TBarSeries;
begin
     Series1 := TBarSeries.Create(self);
     Series2 := TBarSeries.Create(self);
     Chart1.AddSeries(Series1);
     Chart1.AddSeries(Series2);
     Series1.FillSampleValues(5);
     Series2.FillSampleValues(5);

     ChartTool1.Series:=Series2;
     Chart1.Legend.DividingLines.Visible:=False;
     Chart1.Legend.LegendStyle := lsValues;
     Chart1.Legend.TextStyle := ltsXAndValue;
     ChartTool1.Legend.DividingLines.Visible:=False;
     ChartTool1.Legend.TextStyle := ltsXAndValue;
end;

Could you tell us if previous code works as you want? If it doesn't works as you want, please send us a simple project or explain exactly what are you doing, so we can help you to find a good solution for you.
I hope will helps.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply