I have a candle series and a volume series.
Candle series vertical axis startposition 0 and endposition 80
Volume series vertical axis startposition 80 and endposition 100.
And there is a seperator between them.
Mininum label value of candle and maximum label value of volume
sometimes overlaps.
Labels on axis may start and end at a certain position
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hello,
Try setting vertical axes from 0 to 79 and from 80 to 100 respectively. Does it work fine for you?
Try setting vertical axes from 0 to 79 and from 80 to 100 respectively. Does it work fine for you?
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 |
OnGetAxisLabel
Yes, I know.
But I do not want to change Axis bounds.
Also, Axis.StartPosition and Axis.EndPosition are in percent not in pixels.
I use Axis.MinimumOfset and Axis.MaximumOfset.
But axis labels appear out of ofset range.
in OnGetAxisLabel
//I need a double value, but labeltext is string
I try to set labeltext empty string,
labelvalue:=StrToFloat(labeltext );
Delta:=11;//set label height;
if sender.EndPosition<>100 then
begin
minvalue:=sender.CalcPosPoint(sender.IEndPos-Delta);
if labelvalue <minvalue then
begin
labeltext:='';
exit;
end;
end;
if sender.StartPosition<>0 then
begin
maxvalue:=sender.CalcPosPoint(sender.IStartPos+Delta);
if labelvalue >maxvalue then
begin
labeltext:='';
exit;
end;
end;
A potential problem:
Axis.MaxLabelWidth calls OnGetAxisLabel event.
But if labeltext is empty string, then Axis.MaxLabelWidth is not
actual Axis.MaxLabelWidth
Sometimes a few labels appear on axis.
But I do not want to change Axis bounds.
Also, Axis.StartPosition and Axis.EndPosition are in percent not in pixels.
I use Axis.MinimumOfset and Axis.MaximumOfset.
But axis labels appear out of ofset range.
in OnGetAxisLabel
//I need a double value, but labeltext is string
I try to set labeltext empty string,
labelvalue:=StrToFloat(labeltext );
Delta:=11;//set label height;
if sender.EndPosition<>100 then
begin
minvalue:=sender.CalcPosPoint(sender.IEndPos-Delta);
if labelvalue <minvalue then
begin
labeltext:='';
exit;
end;
end;
if sender.StartPosition<>0 then
begin
maxvalue:=sender.CalcPosPoint(sender.IStartPos+Delta);
if labelvalue >maxvalue then
begin
labeltext:='';
exit;
end;
end;
A potential problem:
Axis.MaxLabelWidth calls OnGetAxisLabel event.
But if labeltext is empty string, then Axis.MaxLabelWidth is not
actual Axis.MaxLabelWidth
Sometimes a few labels appear on axis.
Axis Labeling
Axis labeling can be very unpredictable in TChart. It would be great if more attention was paid to this by the developers.
Hi,
using maximum and minimum offset should do the trick :
Chart1.Axes.Left.MinimumOffset:=10;
Chart1.CustomAxes[0].MaximumOffset:=10;
Which is the problem using them ?
using maximum and minimum offset should do the trick :
Chart1.Axes.Left.MinimumOffset:=10;
Chart1.CustomAxes[0].MaximumOffset:=10;
Which is the problem using them ?
Pep Jorge
http://support.steema.com
http://support.steema.com