Show X axis in seconds or minutes or hours?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Dominik,
Yes, but we are pretty busy at the moment and we need some time to review it. We will post a reply ASAP.
Thanks for your patience.
Yes, but we are pretty busy at the moment and we need some time to review it. We will post a reply ASAP.
Thanks for your patience.
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 |
Hi Narcis,
sounds fantastic !
I have to write some other stuff. So it is not so important for within the net days. It would be great if you have some info for me at the end of the next week.
sounds fantastic !
I have to write some other stuff. So it is not so important for within the net days. It would be great if you have some info for me at the end of the next week.
Greetz Dominik
http://www.logview.info
http://www.logview.info
Hi Narcis,
do you think that there will be a solution this week ?
do you think that there will be a solution this week ?
Greetz Dominik
http://www.logview.info
http://www.logview.info
Hi Narcis,
we actually implement TChart as our new charting engine. Do you have any idea when you will have the solution for this time axis problem?
we actually implement TChart as our new charting engine. Do you have any idea when you will have the solution for this time axis problem?
Greetz Dominik
http://www.logview.info
http://www.logview.info
Hi Dominik,
using the following code in your demo app. works fine here :
Does it works fine for you ?
using the following code in your demo app. works fine here :
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
const second=1/(24*3600); //Fractional number representing one second in TDateTime
Var i: Integer;
begin
Series1.XValues.DateTime := True;
With Chart1.BottomAxis do
begin
Increment:=DateTimeStep[dtOneSecond];
DateTimeFormat := ComboBox1.Text;//'hh:mm:ss';
RoundFirstLabel:=False;
end;
Chart1.Series[0].Clear;
Chart1.Series[1].Clear;
For i := 0 to 1336 do begin
Chart1.Series[0].AddXY(Values[i, 1] * second, Values[i, 2]);
Chart1.Series[1].AddXY(Values[i, 1] * second, Values[i, 3]);
end;
end;
Pep Jorge
http://support.steema.com
http://support.steema.com
Hi Pep !
Thx for the reply !
Well ... It works if you use hh:mm:ss. If you try mm:ss I see only 12:57 ...
But maybe there is another way ..
If I use hh:mm:ss I get the following x strings:
00:00:27, 00:00:57, 00:01:27, .....
Is it possible to kill all unimportant zeros? So the result should be something like this:
27, 57, 1:27, ....
And in addition ... If I kill the zeros, would it be also possible to write the strings like this:
27s, 57s, 1m27s, ....
And as the last question ...
How can I enhance the output to dd:hh:mm:ss ? It could be possible that customers produce very large logs.
Thx for the reply !
Well ... It works if you use hh:mm:ss. If you try mm:ss I see only 12:57 ...
But maybe there is another way ..
If I use hh:mm:ss I get the following x strings:
00:00:27, 00:00:57, 00:01:27, .....
Is it possible to kill all unimportant zeros? So the result should be something like this:
27, 57, 1:27, ....
And in addition ... If I kill the zeros, would it be also possible to write the strings like this:
27s, 57s, 1m27s, ....
And as the last question ...
How can I enhance the output to dd:hh:mm:ss ? It could be possible that customers produce very large logs.
Greetz Dominik
http://www.logview.info
http://www.logview.info
Hi Dominik,
DateTimeFormat := 'hs';
This will remove the one character if it's not required for example 01:02:03 will change to 1:2:3.
One way to accomplish it would be to use the OnGetAxisLabel event and there customize the labels, removing the 0, etc..
So, if I understand is correct for you ?Well ... It works if you use hh:mm:ss. If you try mm:ss I see only 12:57 ...
Not with formatted datetime string, that I know. I think the smallest DateTimeFormat would be to use :Is it possible to kill all unimportant zeros? So the result should be something like this:
27, 57, 1:27, ....
DateTimeFormat := 'hs';
This will remove the one character if it's not required for example 01:02:03 will change to 1:2:3.
One way to accomplish it would be to use the OnGetAxisLabel event and there customize the labels, removing the 0, etc..
The best way, as in the above question is to use the OnGetAxisLabel event to add extra chars.And in addition ... If I kill the zeros, would it be also possible to write the strings like this:
27s, 57s, 1m27s, ....
I'm sorry, I'm not sure what you refer here, could you please be more specific ?And as the last question ...
How can I enhance the output to dd:hh:mm:ss ? It could be possible that customers produce very large logs.
Pep Jorge
http://support.steema.com
http://support.steema.com
Hi Pep,
I will add code like this:
Actually I use this DateTimeFormat : hh:mm:ss
This means you have hours:minutes:Seconds
Is there a possibility to use the datetimeformat like this: dd:hh:mm:ss
Which means days:hours:minutes:seconds
Or a datetimeformat like this: hh:mm:ss:ms
Which means hours:minutes:seconds:milliseconds
That´s exactly what I need.OnGetAxisLabel
I will add code like this:
Code: Select all
procedure TForm1.Chart1GetAxisLabel(Sender: TChartAxis;
Series: TChartSeries; ValueIndex: Integer; var LabelText: String);
begin
If Sender = Chart1.BottomAxis Then
if copy(LabelText, 1, 2) = '00' then
LabelText := Copy(LabelText, 4, length(LabelText));
end;
Of courseI'm sorry, I'm not sure what you refer here, could you please be more specific ?
Actually I use this DateTimeFormat : hh:mm:ss
This means you have hours:minutes:Seconds
Is there a possibility to use the datetimeformat like this: dd:hh:mm:ss
Which means days:hours:minutes:seconds
Or a datetimeformat like this: hh:mm:ss:ms
Which means hours:minutes:seconds:milliseconds
Greetz Dominik
http://www.logview.info
http://www.logview.info
Hi Dominik,
DateTimeFormat := 'dd:hh:mm:ss';
This will display day:hour:mm:ss. Maybe you need num. of days ? In that case it should be added manually.
DateTimeFormat := 'hh:mm:ss:zzz';
Yes, setting :Is there a possibility to use the datetimeformat like this: dd:hh:mm:ss
Which means days:hours:minutes:seconds
DateTimeFormat := 'dd:hh:mm:ss';
This will display day:hour:mm:ss. Maybe you need num. of days ? In that case it should be added manually.
Yes, you can display milliseconds setting :Or a datetimeformat like this: hh:mm:ss:ms
Which means hours:minutes:seconds:milliseconds
DateTimeFormat := 'hh:mm:ss:zzz';
Pep Jorge
http://support.steema.com
http://support.steema.com
Hi Pep,
How can I add this manually? Do you have a small example?Maybe you need num. of days ? In that case it should be added manually.
Greetz Dominik
http://www.logview.info
http://www.logview.info
Hi Dominik,
as other things you commented, by using the OnGetAxisLabel event.
as other things you commented, by using the OnGetAxisLabel event.
Pep Jorge
http://support.steema.com
http://support.steema.com