Setting triangle vertical alignment of TPointSeries Marks
Setting triangle vertical alignment of TPointSeries Marks
In the image attached you can see up pointing rectangles (TPointSeries - Pointer.Style := psTriangle)
When I set the coordinate of the point to be X, Y when Y is the highest point of a candle I notice that the
half of the triangle is drawn on the candle, which is not what I wanted ...
It seems that I need one of the two options :
1 - Some form of vertical alignment of the marks instead of center to be up / down
2 - Some option to give a Y pixel offset in this case I would choose the size of triangle / 2
Please note that the solution must support change of zoom ... (the above suggested solutions should support that)
Thanks
Shimon
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Setting triangle vertical alignment of TPointSeries Marks
Hi Shimon,
In that case you can try doing something like this:
Hope this helps!
In that case you can try doing something like this:
Code: Select all
procedure TForm4.Chart1AfterDraw(Sender: TObject);
var j: Integer;
tmp: double;
begin
tmp:=Chart1.Axes.Left.CalcPosPoint(Chart1.Axes.Left.IEndPos-Series2.Pointer.VertSize) -
Chart1.Axes.Left.CalcPosPoint(Chart1.Axes.Left.IEndPos);
Series2.Clear;
for j := 0 to Series1.Count - 1 do
begin
Series2.AddXY(Series1.XValue[j], Series1.HighValues[j] + tmp/2);
end;
end;
procedure TForm4.Chart1UndoZoom(Sender: TObject);
begin
Chart1.Draw;
end;
procedure TForm4.Chart1Zoom(Sender: TObject);
begin
Chart1.Draw;
end;
procedure TForm4.FormCreate(Sender: TObject);
var i: integer;
begin
Chart1.View3D:=false;
for i := 0 to 10 do
Series1.AddCandle(Now+i,5,5,1,1);
Series2.Pointer.Style:=psTriangle;
Chart1.Draw;
end;
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: Setting triangle vertical alignment of TPointSeries Marks
Thanks a lot for your response, I have just noticed that all I needed was change the z order (I accomplished that with ExchangeSeries) and
not vertical alignment.
Anyway - Thank you
not vertical alignment.
Anyway - Thank you