Grid header is affected by legend shadow
Grid header is affected by legend shadow
I have a TeeChart at one panel and a TeeGrid at another panel. If the chart has a legend with shadow, the grid column headers are drawn with shadow color background! There should not be a connection.
Re: Grid header is affected by legend shadow
Hello,
I don't see that connection with this example:
If you still find problems with it, please modify the example above so we can reproduce the problem here, or arrange a simple example project we can run as-is here.
Thanks in advance.
I don't see that connection with this example:
Code: Select all
uses Tee.GridData.Rtti;
var Chart: TChart;
Grid: TTeeGrid;
procedure TForm1.FormCreate(Sender: TObject);
var topPanel,
botPanel: TPanel;
data: TChartValueList;
begin
topPanel:=TPanel.Create(Self);
topPanel.Parent:=Self;
topPanel.Align:=alTop;
topPanel.Height:=Self.Height div 2;
botPanel:=TPanel.Create(Self);
botPanel.Parent:=Self;
botPanel.Align:=alClient;
Chart:=TChart.Create(Self);
Chart.Parent:=topPanel;
Chart.Align:=alClient;
Grid:=TTeeGrid.Create(Self);
Grid.Parent:=botPanel;
Grid.Align:=alClient;
Chart.View3D:=False;
Chart.AddSeries(TBarSeries).FillSampleValues;
data:=Chart[0].YValues;
Grid.Data:=TVirtualData<TChartValueList>.Create(data);
Chart.Legend.Shadow.Size:=8;
Chart.Legend.Shadow.Color:=clRed;
Grid.Header.Format.Brush.Gradient.Hide;
Grid.Header.Format.Brush.Color:=clGreen;
end;
Thanks in advance.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Grid header is affected by legend shadow
The effect isn't visible with your example. But with modification to LineSeries I got the issue:
Re: Grid header is affected by legend shadow
Hello,
I'm afraid changing from
Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
I'm afraid changing from
TBarSeries
to TLineSeries
doesn't change the Grid for me here.Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Grid header is affected by legend shadow
Here is my example.
- Attachments
-
- SteemaExample.zip
- (90.22 KiB) Downloaded 1586 times
Re: Grid header is affected by legend shadow
Hello,
Thanks for the project. We could reproduce the problem and we've been able to fix it.
In the
For this:
Thanks for the project. We could reproduce the problem and we've been able to fix it.
In the
PrepareGradient
nested method, inside the TFMXPainter.SetBrush
method, in FMX/FMXTee.Painter.pas unit, replace this:
Code: Select all
procedure TFMXPainter.SetBrush(const ABrush: TBrush);
//...
procedure PrepareGradient(const AGradient:FMXGradient);
//...
begin
AGradient.Color:=Color0;
AGradient.Color1:=Color1;
//...
Code: Select all
procedure TFMXPainter.SetBrush(const ABrush: TBrush);
//...
procedure PrepareGradient(const AGradient:FMXGradient);
//...
// Do not use AGradient Color0 and Color1. Instead, reset Points property.
// When using a TChart and a TeeGrid together,
// the chart canvas uses 3 point gradients, so it must be reset to 2:
procedure ResetGradientPoints;
var P : TGradientPoint;
begin
AGradient.Points.Clear;
P:=TGradientPoint(AGradient.Points.Add);
P.IntColor:=Color0;
P:=TGradientPoint(AGradient.Points.Add);
P.IntColor:=Color1;
P.Offset:=1;
end;
begin
ResetGradientPoints;
//...
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Grid header is affected by legend shadow
I changed the code as you suggested. But the method isn't used by the example program. Do I have to change anything else?
Re: Grid header is affected by legend shadow
Hello,
After applying the changes to the .pas unit you have two options to use the modified sources:
- Rebuild the sources with TeeGridRecompile and keep using the "[...]\Steema TeeGrid for VCL & FMX Registered version XX\Compiled\DelphiXX.win32\Lib" path.
- Change the library path to directly use the sources. To do this, remove the reference to the "[...]\Steema TeeGrid for VCL & FMX Registered versionXX\Compiled\DelphiXX.win32\Lib" path and add "[...]\Steema TeeGrid for VCL & FMX Registered versionXX\Sources" and "[...]\Steema TeeGrid for VCL & FMX Registered versionXX\Sources\FMX" paths.
After applying the changes to the .pas unit you have two options to use the modified sources:
- Rebuild the sources with TeeGridRecompile and keep using the "[...]\Steema TeeGrid for VCL & FMX Registered version XX\Compiled\DelphiXX.win32\Lib" path.
- Change the library path to directly use the sources. To do this, remove the reference to the "[...]\Steema TeeGrid for VCL & FMX Registered versionXX\Compiled\DelphiXX.win32\Lib" path and add "[...]\Steema TeeGrid for VCL & FMX Registered versionXX\Sources" and "[...]\Steema TeeGrid for VCL & FMX Registered versionXX\Sources\FMX" paths.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Grid header is affected by legend shadow
Thank you, now it is working