preciseTimeUnit

used to set precision for task position and width

boolean preciseTimeUnit;

Example

webix.ui({
  view:"gantt",
  preciseTimeUnit: true, // enables tasks precision for all scales
  // other config
});

Details

The possible values of the property are:

  • true - tasks position and length are calculated with the precision to a unit smaller by one step than the smallest scale unit:
    • if the smallest scale unit is year, tasks are rounded to quarters;
    • if the smallest scale unit is quarter, tasks are rounded to months;
    • if the smallest scale unit is month, tasks are rounded to days;
    • if the smallest scale unit is week, tasks are rounded to days;
    • if the smallest scale unit is day, tasks are rounded to hours;
    • if the smallest scale unit is hour, tasks are rounded to minutes;
  • false - task position and length are rounded to the smallest scale unit;
  • undefined (default) - works as true except for the "day" scale, in which rounding is still to days, assuming day-based workflow.

To change this property at runtime you should call the setScales() method of Local service passing true/false or nothing (evaluated as "undefined") as the third parameter:

// rounding to the smallest scale unit
$$("gantt").getService("local")
.setScales(new Date(2020,8,9), new Date(2020, 11, 23), false);
See also
Back to top