Hi Narcís,
I´ve just uploaded a small sample application to your server:
Received TimeAxis Demo.zip Content Type application/x-zip-compressed Length 33937
Let me explain some usecases where I have trouble...
1) Always recalculate the X values
As you can see in the source, I have always to recalculate the x values if I switch between the normal and the time axis view. This is because the timeaxis needs the
for a correct display.
If I switch back (and don´t recalculate the X values) then I got very very small values for the normal view. You can try this if you use this code for button2:
Code: Select all
procedure TForm1.Button2Click(Sender: TObject);
Var i: Integer;
begin
Series1.XValues.DateTime := False;
end;
2) Axes.Bottom.DateTimeFormat "mm:ss"
If you set Chart1.Axes.Bottom.DateTimeFormat to "mm:ss" the time always starts with 12:00. Only switch the combo in the demo and press "Set X to time" again.
And the next problem is ... after 12:00 you will have 12:30 and then it switched back to 12:00.
It´s a little bit confusing
3) Axes.Bottom.DateTimeFormat "ss"
This will show values from 00 to 59, go back to 00 and so on ...
Changing DateTimeFormat to ssss don´t bring better results.
4) floating seconds and / or minutes
I have no idea how to set up the axis to see the time in this format:
94,7 (which means 94m42s). Or something like this: 1,5783 (which means 1h34m42s).
How can I do this?
5) adding characters instead of ":"
It would be a better to see
1h34m42s instead of
1:34:42. But no idea how to set up the axis, too.
It would be great if you can enhance my short demo in that way, that I can switch between the different views with correct results. I think this is also interesting for other people who need a time axis ...
So it would be great if I can switch between this time formats:
- hh:mm:ss
hhhmmmsss (See point 5)
mm:ss
mmmsss (See point 5)
sss
(See point 5)
Some hints to the format ss ... This is not really important because it is the normal view. Keep in mind that we always use seconds for the x axis.
And our x axis always start from 0 or from 1!
Hope on any help
And one last question ...
Is it possible to reduce times like 00:00:01 to 1 or 00:02:41 to 2:41? Is think this would look better for the users.