Good morning,
I have the following problem with the value labels.
await solution, thanks.
Value Labels
Re: Value Labels
Hi José,
As the mark has been moved, it has to be recalculated if the chart changes. You could call a method like following when the legend visibility changes:
As the mark has been moved, it has to be recalculated if the chart changes. You could call a method like following when the legend visibility changes:
Code: Select all
procedure TForm1.RecalcMarks;
var i, tmpx, dx: Integer;
pos: TSeriesMarkPosition;
begin
for i:=0 to Chart1[0].Count-1 do
begin
tmpx:=Chart1[0].CalcXPos(i) + (Chart1[0] as TBarSeries).BarWidth div 2;
pos:=Chart1[0].Marks.Positions[i];
if (tmpx <> pos.ArrowFrom.X) then
begin
dx:=pos.ArrowTo.X - pos.ArrowFrom.X;
pos.ArrowFrom.X:=tmpx;
pos.ArrowTo.X:=tmpx + dx;
pos.LeftTop.X:=tmpx + dx - (pos.Width div 2);
end;
end;
Chart1.Repaint;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |