scales

array of scale lines for Gantt

array scales;

Example

webix.ui({
  view: "gantt",
  scales: [
    {
      unit: "month",
      step: 1,
      format: function(date) {
        return webix.Date.dateToStr("%F, %Y")(date);
      },
    },
    { unit: "day", step: 1, format: "d" }
  ],
  url: "https://docs.webix.com/gantt-backend",
});

Details

Array of scale lines where each scale object has the following fields:

  • unit (string) - scale unit ("hour", "day", "week", "quarter", "month", "year");
  • step (number) - number of units per cell;
  • format (string, function) - scale cell format. If it's used as a function it should return a formatted date. If defined as a string it should be a date format like "%Y-%F-%d".

If the it is not defined it will take the default value - one line for days: [{ unit: "day", step: 1, format: "d" }].

See also
Back to top