跳到主要内容

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 插件。请在 Adding Vertical Markers 文章中阅读详细信息。

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.