scale_unit

sets the unit of the time scale (X-Axis)

string scale_unit;

Values

  • "minute", "hour", "day", "week", "quarter", "month", "year"
  • Deprecated

    Use the unit property of the scales instead:

    gantt.config.scales = [
        {unit: "month", step: 1, format: "%F, %Y"},
        {unit: "week", step: 1, format: weekScaleTemplate},
        {unit: "day", step: 1, format: "%D", css:daysStyle }
    ];

    Example

    gantt.config.scale_unit = "month";
    gantt.config.date_scale = "%F, %Y";
     
    gantt.init("gantt_here");


    Default value:

    'day'

    Related samples

    Details

    There is a possiblity to set a custom unit. Read more on the topic here.

    See also
    Change log

    deprecated since v6.2

    Back to top