When Series marks are positioned they loose some of their capabilities.
I can cange the fonts color and size, but the surrounding rectangle is gone. No matter if I try it for the whole series or for a individual mark, I never see more than the pure text.
APosition := TSeriesMarkPosition.Create;
APosition.Custom := false;
APosition.LeftTop.X := Series1.Marks.Positions.LeftTop.X;
APosition.LeftTop.Y := 50;
Series1.Marks.Positions := APosition;
with Series1.Marks do begin
Font.Size:=12; // works
Font.Color:=clRed; // works
Color:=clNavy; // dows not work
end;
Custom marks loose background rect
I finally found the problem by myself :
I took pieces of sourcecode from Steema, they always set just just the position itself.
But the position contains more parameters that MUST be set to work, these are at least the height and width parameter.
Looking back it seems quite logical.
Neiither the examples nor the help tells anything about this.
I understand that it is not always possible to avoid misleading words like position. But the help should be more helpful in this case.
I took pieces of sourcecode from Steema, they always set just just the position itself.
But the position contains more parameters that MUST be set to work, these are at least the height and width parameter.
Looking back it seems quite logical.
Neiither the examples nor the help tells anything about this.
I understand that it is not always possible to avoid misleading words like position. But the help should be more helpful in this case.
About marks rectangle again....
Hi!
I have a same problem that you had, when white rectangle of Arrow marks doesn't display at screen at all...
Could you write please in detail, how did you fix it?
Does anyone have the problem of this kind?
I have a same problem that you had, when white rectangle of Arrow marks doesn't display at screen at all...
Could you write please in detail, how did you fix it?
Does anyone have the problem of this kind?
Hi,
if you customize any Mark you must set the width and height of the mark :
if you customize any Mark you must set the width and height of the mark :
Code: Select all
procedure TForm1.BitBtn1Click(Sender: TObject);
var APosition: TSeriesMarkPosition;
begin
APosition := TSeriesMarkPosition.Create;
APosition.Custom := false;
APosition.LeftTop.X := Series1.Marks.Positions[0].LeftTop.X;
APosition.LeftTop.Y := 50;
APosition.Width:=12+Chart1.Canvas.Textwidth(floattostr(series1.YValue[0]))+12;
APosition.Height:=20;
Series1.Marks.Positions[0] := APosition;
with Series1.Marks[0] do begin
Font.Size:=12; // works
Font.Color:=clRed; // works
Color:=clNavy; // dows not work
end;
end;
Pep Jorge
http://support.steema.com
http://support.steema.com