B4J Question xGantt class. Duration of tasks by ours instead of days .

javiers

Active Member
Licensed User
Longtime User
Is it possible to have the duration of tasks by hours?
xGantt class is great ( @klaus ), but I wish the duration could be expressed in hours (1...24) for each day.

I would appreciate the help.
 
Last edited:
Solution
Attached version 0.98.
Tested with B4J and B4A, not B4i yet.
Please test it, and when it works also for you, i will then publish it as b4xlib Library.

1725538982516.png


What you can do:
- Change the texts, adapt them to your language.

1725539001620.png


- Hide the ID and or the Responsible column.

1725539028692.png


- When you click on a row and move the mouse, the data of that row is displayed.

1725539094854.png


- When you click on an arrow, the diagram jumps to show the beginning of the task or group.

1725539715813.png
1725539736172.png


- You can take a snapshot of the current display with the Snapshot method which returns a B4XBitmap.

EDIT 2024.09.13
I have removed the zip file.
You find the latest version in the xGanttLite thread.

klaus

Expert
Licensed User
Longtime User
Well, I am progressing step by step and it takes some time.
I suppose that you know the 80 - 20 principle.
May I ask you a somehow private question: Where do you live, as your language is Spanish and it seems that we live not in a neighbor longitude ?
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Just to show what I mean with the 80 - 20 principle.
Adding a Task. This means adding a row at the end.
We need to verify that the ID does not exist, therefore obligation to change the ID.
Then with a different ID, we need to check the GroupId.
In this case it would be more efficient to insert the new task at the end of the group instead of the end of the rows.
I need to think more in details if managing new tasks or groups is worth the time to invest.
Probably, the first 'public' project would be only the display, this is what you expected, and see if there is a real interest for the management.
The possibility to modify an existing task with the mouse will remain.
I hope that this is OK for you.
 
Upvote 0

javiers

Active Member
Licensed User
Longtime User
Just to show what I mean with the 80 - 20 principle.
Adding a Task. This means adding a row at the end.
We need to verify that the ID does not exist, therefore obligation to change the ID.
Then with a different ID, we need to check the GroupId.
In this case it would be more efficient to insert the new task at the end of the group instead of the end of the rows.
I need to think more in details if managing new tasks or groups is worth the time to invest.
Probably, the first 'public' project would be only the display, this is what you expected, and see if there is a real interest for the management.
The possibility to modify an existing task with the mouse will remain.
I hope that this is OK for you.
I understand you perfectly. I have already told you that you have gone further than I could have expected.
In my case it is perfect as it is. All task modifications are made with another program and feed into an SQLITE database. The application with your Gantt class reads the records and displays them. From time to time, with a timer, it reads the records again and updates the information.

I show you the two applications...

and again thank you, thank you!!
1726596927783.png


1726597085202.png


1726596954916.png
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
The next three days i am not at home therefore no B4X.
In the mean time a made something strange, i do not know what nor understand why but i lost my latest work, very strange.
Even in the B4X backups i do not find it.
At least you have a working project.
 
Upvote 0
Top