跳到主要内容

getSubHeaderCellIndex()

描述

根据子表头的 id 返回 swimlane 中单元格的索引

用法

getSubHeaderCellIndex(subheaderId: string): number;

参数

  • subheaderId - (必需)swimlane 子表头的 id

返回值

该方法返回单元格的索引。索引计数从 0 开始。

示例

// 初始化图表
const diagram = new dhx.Diagram("diagram_container", {
// 配置选项
});
diagram.data.parse(data);

// 设置活动 swimlane
diagram.cellManager.setSwimlane("main");

// 获取单元格的索引
diagram.cellManager.getSubHeaderCellIndex("sub01"); // -> 0

更新日志:v4.0 中新增

相关文章配置 Swimlanes