The shadow of the marks does not work on DBChart (TeeChart Standard v2011 VCL - Delphi 7)
At runtime:
/ / does not work
MyDBChart.Series [0]. Marks.Shadow.Visible: = False;
/ / does not work
MyDBChart.Series [0]. Marks.Shadow.Transparency: = 100;
/ / This works fine
MyDBChart.Series [0]. Marks.FontSeriesColor: = True;
How do I remove the shadow?
I can not remove the shadow (marks)
Re: I can not remove the shadow (marks)
Hello Pense,
I'm not able to reproduce the problem here. Are you using the latest version available (v2011.03.30407)?
The three lines you mentioned seem to work as expected for me here with a TPointSeries and a TBarSeries.
I'm not able to reproduce the problem here. Are you using the latest version available (v2011.03.30407)?
The three lines you mentioned seem to work as expected for me here with a TPointSeries and a TBarSeries.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: I can not remove the shadow (marks)
Oi Yeray,
Obrigado por responder ao meu post. O cenário do meu problema é o seguinte:
No formulário eu tenho um Button e um DBChart apenas, além de 3 procedimentos. O problema todo foi provocado por um pequeno algoritmo no evento OnShow do formulário que oculta todas as Marks cujo valor seja igual a zero (YValue = 0).
procedure TForm1.FormCreate(Sender: TObject);
begin
(DBChart1.AddSeries(TBarSeries) as TBarSeries).FillSampleValues();
end;
procedure TForm1.FormShow(Sender: TObject);
var i: integer;
begin
// exemplo
DBChart1.Series[0].YValue[1]:= 0;
// após executar este algoritmo, o evento do botão deixa de funcionar
// Exit;
with DBChart1.Series[0] do
for i:= 0 to (Count-1) do
Marks.Visible:= YValue>0;
end;
// Evento atribuído ao botão (TButton) que está no Formulário
procedure TForm1.BtnShadowClick(Sender: TObject);
begin
with DBChart1.Series[0].Marks.Shadow do
Visible:= not Visible;
end;
Obrigado por responder ao meu post. O cenário do meu problema é o seguinte:
No formulário eu tenho um Button e um DBChart apenas, além de 3 procedimentos. O problema todo foi provocado por um pequeno algoritmo no evento OnShow do formulário que oculta todas as Marks cujo valor seja igual a zero (YValue = 0).
procedure TForm1.FormCreate(Sender: TObject);
begin
(DBChart1.AddSeries(TBarSeries) as TBarSeries).FillSampleValues();
end;
procedure TForm1.FormShow(Sender: TObject);
var i: integer;
begin
// exemplo
DBChart1.Series[0].YValue[1]:= 0;
// após executar este algoritmo, o evento do botão deixa de funcionar
// Exit;
with DBChart1.Series[0] do
for i:= 0 to (Count-1) do
Marks.Visible:= YValue>0;
end;
// Evento atribuído ao botão (TButton) que está no Formulário
procedure TForm1.BtnShadowClick(Sender: TObject);
begin
with DBChart1.Series[0].Marks.Shadow do
Visible:= not Visible;
end;
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: I can not remove the shadow (marks)
Hi Pense,
I could reproduce the issue here now and added it (TV52015618) to the defect list to be investigated. As an alternative, there's a much easier way to hide marks which is using the OnGetMarkText event as shown here:
Doing so marks shadow visibility can be toggled.
Hope this helps!
I could reproduce the issue here now and added it (TV52015618) to the defect list to be investigated. As an alternative, there's a much easier way to hide marks which is using the OnGetMarkText event as shown here:
Code: Select all
uses Series;
procedure TForm1.FormCreate(Sender: TObject);
begin
DBChart1.AddSeries(TBarSeries.Create(Self)).FillSampleValues;
DBChart1[0].OnGetMarkText := Series1GetMarkText;
end;
procedure TForm1.FormShow(Sender: TObject);
//var i: integer;
begin
DBChart1[0].YValue[1]:= 0;
//Hidding Marks with Y = 0 in loop below makes marks shadow not responsive
//Exit;
{with DBChart1[0] do
for i:= 0 to (Count-1) do
Marks[i].Visible:= YValue[i]>0;
}
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
with DBChart1[0].Marks.Shadow do
Visible:= not Visible;
end;
procedure TForm1.Series1GetMarkText(Sender: TChartSeries;
ValueIndex: Integer; var MarkText: String);
begin
if MarkText=IntToStr(0) then MarkText:='';
end;
Hope this helps!
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: I can not remove the shadow (marks)
Oi Narcís,
Sim, está resolvido. Muito obrigado!
Ficou assim:
procedure TForm1.Series1GetMarkText(Sender: TChartSeries;
ValueIndex: Integer; var MarkText: String);
begin
if Sender.YValue[ValueIndex] = 0 then
MarkText:='';
end;
Sim, está resolvido. Muito obrigado!
Ficou assim:
procedure TForm1.Series1GetMarkText(Sender: TChartSeries;
ValueIndex: Integer; var MarkText: String);
begin
if Sender.YValue[ValueIndex] = 0 then
MarkText:='';
end;