Hi,
I am trying to display the starting DateTime at the intersection of the BottomAxis with the LeftAxis and it seems not to really work.
I tried to tune the LabelsSeparation property but the result is not really convincing and I fail to display the first DateTime.
How can I force the Chart BottomAxis to have a label at its intersection with the LeftAxis, and get this time value (00:35:00) displayed.
I arranged a small example and I would appreciate to know if this is feasible at all with the 2013 version of TeeChart.
Many thanks for any hint on how to proceed here.
Label (Time) at at intersection
Label (Time) at at intersection
- Attachments
-
- Capture.JPG (46.85 KiB) Viewed 9933 times
-
- LabelAtIntesection.zip
- (78.6 KiB) Downloaded 652 times
thanks,
Nabil Ghodbane (PhD. Habil)
Nabil Ghodbane (PhD. Habil)
Re: Label (Time) at at intersection
Hello,
The easiest would be manually drawing your label. Ie:
The easiest would be manually drawing your label. Ie:
Code: Select all
procedure TForm2.Chart1AfterDraw(Sender: TObject);
var tmpValue: Double;
tmpXPos: Integer;
tmpS: String;
begin
tmpValue:=Chart1.Axes.Bottom.Minimum;
tmpS:=FormatDateTime(Chart1.Axes.Bottom.DateTimeFormat, tmpValue);
if Chart1.Axes.Bottom.LabelsMultiLine then
tmpS:=ReplaceChar(tmpS,' ',TeeLineSeparator);
tmpXPos:=Chart1.Axes.Bottom.CalcPosValue(tmpValue);
Chart1.Axes.Bottom.DrawAxisLabel(tmpXPos, Chart1.Axes.Bottom.PosAxis + Chart1.Axes.Bottom.TickLength + 1, Chart1.Axes.Bottom.LabelsAngle, tmpS);
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Label (Time) at at intersection
Hi,
many thanks for the approach, but unfortunately it does not really work in all scenarios. The label which is drawn using the approach you suggest overlaps with the first time label which is drawn.
I tried to play on the width of the label without any success. I also tried to not plot this item if the first item of the BottomAxis (Axes.Bottom.Items) is at the same position, but this does not really help as well.
Is there a plan to have something implemented centrally, say as one BottomAxis option ? It would be much easier.
many thanks for the approach, but unfortunately it does not really work in all scenarios. The label which is drawn using the approach you suggest overlaps with the first time label which is drawn.
I tried to play on the width of the label without any success. I also tried to not plot this item if the first item of the BottomAxis (Axes.Bottom.Items) is at the same position, but this does not really help as well.
Is there a plan to have something implemented centrally, say as one BottomAxis option ? It would be much easier.
thanks,
Nabil Ghodbane (PhD. Habil)
Nabil Ghodbane (PhD. Habil)
Re: Label (Time) at at intersection
How would you expect it to behave exactly?cssesuc wrote:The label which is drawn using the approach you suggest overlaps with the first time label which is drawn.
I tried to play on the width of the label without any success. I also tried to not plot this item if the first item of the BottomAxis (Axes.Bottom.Items) is at the same position, but this does not really help as well.
At the moment, the labels in the bottom axis are drawn from right to left. If you want the minimum to be automatically calculated so it matches the next label, you can set:
Code: Select all
BottomAxis.AutomaticMinimum:= True;
BottomAxis.MinimumRound:=True;
Or maybe you'd like the labels to be drawn from left to right? I'm not sure if it would be easy to implement that.
Worth to mention here you always have the possibility to Clean all the labels Items in the bottom axis and Add those you want.
This is a quite specific feature. It would be interesting if there was a considerable amount of customers interested.cssesuc wrote:Is there a plan to have something implemented centrally, say as one BottomAxis option ? It would be much easier.
Before deciding that, we should define what is the exact behaviour to expect.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Label (Time) at at intersection
Hi,
thanks for your feedback. Yes you're right, in the case of a Minimum time which is say 00:00 or 00:30, it works, but in my case, I need to handle scenarios for which the Minimum time, is, say 00:05 or 00:37.
In that case, the Chart does not display that value.
So what I want to have displayed at the intersection of the bottom/left axes, is the start time. Setting the label as you suggested in your first reply does the job, but unfortunately, it overlaps with the first item of the BottomAxis.Items. I tried to compare the distance of the label I insert to the first item and if the do overlap, simply remove the first item, but it does not really work.
So I had basically two questions:
1- is there a smart approach you could suggest to ovoid this overlap between the label and the first item ?
2- you said that in order to implement this centrally, you need to have a sufficient number of users who request this feature. what is the "threshold " here?
thanks for clarifying the two points above.
thanks for your feedback. Yes you're right, in the case of a Minimum time which is say 00:00 or 00:30, it works, but in my case, I need to handle scenarios for which the Minimum time, is, say 00:05 or 00:37.
In that case, the Chart does not display that value.
So what I want to have displayed at the intersection of the bottom/left axes, is the start time. Setting the label as you suggested in your first reply does the job, but unfortunately, it overlaps with the first item of the BottomAxis.Items. I tried to compare the distance of the label I insert to the first item and if the do overlap, simply remove the first item, but it does not really work.
So I had basically two questions:
1- is there a smart approach you could suggest to ovoid this overlap between the label and the first item ?
2- you said that in order to implement this centrally, you need to have a sufficient number of users who request this feature. what is the "threshold " here?
thanks for clarifying the two points above.
thanks,
Nabil Ghodbane (PhD. Habil)
Nabil Ghodbane (PhD. Habil)
Re: Label (Time) at at intersection
Hello,
If we take the example you attached above and we modify the bottom axis minimim and maximum as follows:
I understand you'd expect one label at "03/11/2015 22:32:00". But what other exact labels would you expect?
The time until we can fix a bug or implement a new feature also depends on other variables such as the complexity of the problem, impact and the number of issues with even higher priority that claims our team attention.
I'm still not sure about how would you expect the rest of the labels to be.cssesuc wrote:1- is there a smart approach you could suggest to ovoid this overlap between the label and the first item ?
If we take the example you attached above and we modify the bottom axis minimim and maximum as follows:
Code: Select all
BottomAxis.Minimum:= StrToDateTime('03/11/2015 22:32:00');
BottomAxis.Maximum:= StrToDateTime('06/11/2015 0:32:00');
First we should define a concrete feature request, and at the moment I'm not sure what would be the exact definition of the same.cssesuc wrote:2- you said that in order to implement this centrally, you need to have a sufficient number of users who request this feature. what is the "threshold " here?
The time until we can fix a bug or implement a new feature also depends on other variables such as the complexity of the problem, impact and the number of issues with even higher priority that claims our team attention.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |