Our state of the art Gantt chart
Hey there,
I know this is a far fetched question but I was looking to find where Gantt does its date calculations so I can work the same logic on a sync request on our backend (PHP). I thought date calculations were done with ChronoGraph but guess that's not the case.
Thank you very much!
How can i make sure that startdate and enddate in db(mysql) always reflect same value which we see in gantt , because gantt applies some calculation on dates coming from db and chnages them viisually on gantt which are totaly diffrent then what we have in our db and it messes things when we use/display(php/vue) those dates anywhere else
How can i make sure that startdate and enddate in db(mysql) always reflect same value which we see in gantt
If you store the data from the Gantt without modifying it, it should work just fine.
because gantt applies some calculation on dates coming from db and chnages them viisually on gantt which are totally diffrent then what we have in our db
Could you provide a runnable test case? Including a snapshot of the JSON data sent by the server, and a screenshot of how it looks?
The Gantt scheduling engine will update start and end dates of automatically scheduled events based on their constraints, links and position in the task hierarchy. This means that the startDate and endDate will be revalidated and might be recalculated as soon as the event is added or loaded to a project.
Suppose i have this in db as startDate:21-12-2020
when i load this up in gantt it applies some calculation on it and changes this date to 23-12-2020, now my backend db has date "21-12-2020" but gantt is showing "23-12-2020", that means gantt should send a sync request to server so i can update startdate in db too otherwise i have 2 diffrent dates , one is calculated (which only appears on gantt) and one which is db
Did the DB value of "21-12-2020" come from our Gantt chart originally, or this value / change came from somewhere else? Sounds like value is incorrect according to our engine, the engine validates and corrects the schedule data as it enters the Gantt project.
Gantt chart displays the data which we supplies it right ? may be the date we supplied does not fits in logic of gantt and it invalidates it and correcly generate a new one and displays it in gantt but now we have diffrent/wrong date in our db/datasource , is not there must be some way that i can have same date in db/datasource too ?
the engine validates and corrects the schedule data as it enters the Gantt project.
==> and it does not sends a sync request with updated dates so i can correct the date in db , or if i have equvilanet logic to correct the dates of a task in entire tree the way gantt does in js (ours backend in laravel php )