Page 1 of 1

Custom Legend Tool - Make background transparent

Posted: Sat Dec 18, 2010 3:52 am
by 9348135
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

Re: Custom Legend Tool - Make background transparent

Posted: Mon Dec 20, 2010 12:26 pm
by 10050769
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,