跳到主要内容

date_scale

警告

属性已弃用。

Description​

设置时间刻度(X 轴)的格式

Example​

gantt.config.scale_unit = "month";
gantt.config.step = 1;
gantt.config.date_scale = "%F, %Y";

gantt.init("gantt_here");

默认值: "%d %M"

Details​

注释

date_scale 属性已弃用。请改用 scales 的 format 属性:

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

Change log​

  • 自 v6.2 起已弃用

Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.