跳到主要内容

getMarker

Description

获取标记对象

getMarker: (markerId: string | number) => any

Parameters

  • markerId - (required) string | number - 标记的ID

Returns

  • marker - (object) - 标记的配置对象

Example

const todayMarker = gantt.addMarker({
start_date: new Date(),
css: "today",
text:"Now"
title:date_to_str( new Date())
});
gantt.getMarker(todayMarker); //->{css:"today", text:"Now", id:...}

Details

注释

该方法属于 marker 扩展的一部分,因此请确保已启用 marker 插件。更多详情请参阅 添加垂直标记 文章。