跳到主要内容

baselines

Description

配置 baselines 在甘特图中的功能

baselines: BaselineConfig | boolean

Example

gantt.config.baselines = {
datastore: "baselines",
render_mode: false,
dataprocessor_baselines: false,
row_height: 16,
bar_height: 8
};
gantt.init("gantt_here");

Details

该配置定义了甘特图中基线的处理和显示方式。它可以被设置为对象以自定义显示,或设置为布尔值以启用或禁用该特性。对象配置包含以下属性:

  • datastore - (string) - 用于存储基线条目的数据存储名。有关相关功能,请参阅 getDatastore 方法。
  • render_mode - (boolean | string) - 确定基线的显示方式:
  • false - 不显示基线。
  • "taskRow" - 基线与任务条在同一行显示。
  • "separateRow" - 基线显示在单独的子行中,扩展任务行高度。
  • "individualRow" - 每条基线在任务下方的独立子行中显示。
  • dataprocessor_baselines - (boolean) - 指定是否将基线更新作为单独条目触发 DataProcessor。
  • row_height - (number) - 定义基线子行的高度,仅在 render_mode 设置为 "separateRow""individualRow" 时适用。
  • bar_height - (number) - 设置基线条的高度。

Change log

  • added in v9.0
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.