跳到主要内容

show_chart

Description

显示甘特图的时间线区域

show_chart: boolean

Example

// 隐藏甘特图的时间线部分
gantt.config.show_chart = false;
gantt.init("gantt_here");

Default value: true(时间线部分显示)

Details

gantt.config.show_chart = false 在需要快速隐藏甘特图的时间线区域时很有用,而 gantt.config.show_grid = false 则用于隐藏网格区域。若你在简单布局中工作,最好不要同时使用这两个选项,因为可能会导致意外的结果。相反,你应该通过 gantt.config.layout 来改变布局的配置。

show_chart 选项仅在布局保持其默认配置且未通过 gantt.config.layout 修改时生效。如果你使用自定义布局,则需要定义多个自定义配置并在它们之间切换,以控制图表的可见性。

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.