Greetings,
Using a chart with several line series and display mark on click, the marks for some series appear behind "later" line series.
Any way to have marks always "in front" of all lines?
Thanks.
Marks - behind series
I cannot reproduce the problem here using the TeeChart Pro v6.01. Could you please post the code that you're using so I can reproduce it here ?
Josep Lluis Jorge
http://support.steema.com
Josep Lluis Jorge
http://support.steema.com
Does the problem happens using the following code ? :
Josep Lluis Jorge
http://support.steema.com
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var i,j : integer;
begin
for i:=0 to 5 do
for j:=0 to 9 do
Chart1[i].AddXY(j,Random(10),'ValueIndex'+TeeLineSeparator+inttostr(i),clteecolor);
Charttool1.MouseAction :=mtmClick;
for i :=0 to 5 do
Chart1[i].Marks.MultiLine := true;
end;
http://support.steema.com
Hi,
Yes, it does. Is a simple case of some series lines obscuring the marks for other series.
The example code need not even be that complex:
for i:=0 to 1 do
for j:=0 to 9 do
Chart1.AddXY(j,Random(10),'ValueIndex'+TeeLineSeparator+inttostr(i),clteecolor);
==
in edit chart, turn all marks on and when the second series line is in front of first series "point" then mark for first point is obscured. 2d or 3d makes no difference. Is a case of mark tips not "floating" above all else, except of course other mark tips.
But, I'm not using any marktool. The code was first developed with TChart v4. Don't know right off how to make extra tool in your example function.
Thanks.
Yes, it does. Is a simple case of some series lines obscuring the marks for other series.
The example code need not even be that complex:
for i:=0 to 1 do
for j:=0 to 9 do
Chart1.AddXY(j,Random(10),'ValueIndex'+TeeLineSeparator+inttostr(i),clteecolor);
==
in edit chart, turn all marks on and when the second series line is in front of first series "point" then mark for first point is obscured. 2d or 3d makes no difference. Is a case of mark tips not "floating" above all else, except of course other mark tips.
But, I'm not using any marktool. The code was first developed with TChart v4. Don't know right off how to make extra tool in your example function.
Thanks.
Hi, Jim.
I've tried to replicate the problem here (TC 6.01) and series marks were displayed over series lines. Which TeeChart version are you using ? Did you do any special tricks with series marks or are you simply displaying multiple series marks on plain chart ?
One thing you should be careful about is series mark positions are created only after the chart is drawn. So, you can call Chart.Draw to create all positions or use the code bellow to manually create series mark position:
I've tried to replicate the problem here (TC 6.01) and series marks were displayed over series lines. Which TeeChart version are you using ? Did you do any special tricks with series marks or are you simply displaying multiple series marks on plain chart ?
Is the problem that you have more than one series with visible marks and one series marks overlap other series marks ? In this case the only solution might be to manually reposition series marks after they are already drawn. This is generally not an easy task - you'll have to compare each mark bounding box with all other marks and if two boxes intersect, move one of them. Moving series marks is not a problem (see code bellow), the problem is calculating new position so that it does not intersect with any other series marks.when the second series line is in front of first series "point" then mark for first point is obscured. 2d or 3d makes no difference. Is a case of mark tips not "floating" above all else, except of course other mark tips.
Code: Select all
// customize series mark position - just an example!
With Series1.Marks.Positions[0] do
begin
Custom:=True;
LeftTop.X:=100;
LeftTop.Y:=60;
end;
Code: Select all
Var APosition:TSeriesMarkPosition;
APosition:=TSeriesMarkPosition.Create;
try
APosition.Custom:=True;
APosition.LeftTop.X:=100;
Series1.Marks.Positions[Index]:=APosition;
....
APosition.LeftTop.X:=200;
Series1.Marks.Positions[OtherIndex]:=APosition;
finally
APosition.Free;
end;
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
Same Problem in 2D Bar Series
I'm having the same problem ( marks behind the series ) when I use Bar Series and 2D ( in 3D it's OK ). I'm using the TChart that comes with Delphi 5.0. I calculate the marks points manually, but it isn't the cause. Is there a patch for this problem ?
Regards.
Marcelo
Regards.
Marcelo
Marjan wrote:Hi, Jim.
I've tried to replicate the problem here (TC 6.01) and series marks were displayed over series lines. Which TeeChart version are you using ? Did you do any special tricks with series marks or are you simply displaying multiple series marks on plain chart ?
Is the problem that you have more than one series with visible marks and one series marks overlap other series marks ? In this case the only solution might be to manually reposition series marks after they are already drawn. This is generally not an easy task - you'll have to compare each mark bounding box with all other marks and if two boxes intersect, move one of them. Moving series marks is not a problem (see code bellow), the problem is calculating new position so that it does not intersect with any other series marks.when the second series line is in front of first series "point" then mark for first point is obscured. 2d or 3d makes no difference. Is a case of mark tips not "floating" above all else, except of course other mark tips.One thing you should be careful about is series mark positions are created only after the chart is drawn. So, you can call Chart.Draw to create all positions or use the code bellow to manually create series mark position:Code: Select all
// customize series mark position - just an example! With Series1.Marks.Positions[0] do begin Custom:=True; LeftTop.X:=100; LeftTop.Y:=60; end;
Code: Select all
Var APosition:TSeriesMarkPosition; APosition:=TSeriesMarkPosition.Create; try APosition.Custom:=True; APosition.LeftTop.X:=100; Series1.Marks.Positions[Index]:=APosition; .... APosition.LeftTop.X:=200; Series1.Marks.Positions[OtherIndex]:=APosition; finally APosition.Free; end;