Our state of the art Gantt chart


Post by Jerther »

Hi!

I have noticed that when I save a task having an effort with a periodic decimal number, my back end does not handle those numbers the same way as the JS side does. So if a sync request is sent to update a task to a duration of 2.033333333333333, my backend returns a duration of 2.03333333333333 (missing a digit) and that causes the task effort to change drastically, even though it is set to effort driven and Fixed Units. I have other problems where the effort changes randomy, and I assume they all have the same root problem.

Boy have I searched for the cause of this one...

Here's a screencast. This shows a customized solution but its only goal is to illustrate what happens when a sync request does not return the same exact duration value.

I acknowledge the problem is on the back end side here. It's a classic case with floating point values.

So my question is, what is the precision of the floating point fields in Bryntum Gantt? Can I assume they're all IEEE 754 so I could find a match between them and my database, or is it best just to store them in plain string format?


Post by mats »

We just use the regular JS Number type. Nothing special: https://developer.mozilla.org/en-US/docs/Glossary/Number


Post Reply