dhtmlxgantt 清除tooltip
时间: 2023-09-30 13:02:34 浏览: 118
要清除dhtmlxgantt中的tooltip,可以使用以下方法:
1. 使用`gantt.templates.tooltip_text`模板函数来定义tooltip的内容,将其返回为空字符串即可清除tooltip的显示。例如:
```javascript
gantt.templates.tooltip_text = function(start, end, task) {
return "";
};
```
2. 使用`gantt.ext.tooltip.clear`方法来清除当前显示的tooltip。例如:
```javascript
gantt.ext.tooltip.clear();
```
3. 如果想要完全禁用tooltip,可以使用`gantt.config.tooltip_enabled`配置项将其设置为false。例如:
```javascript
gantt.config.tooltip_enabled = false;
```
这样一来,tooltip将不会再显示。
你可以参考以下文档来获取更多关于dhtmlxgantt的信息:
- [Layout Configuration](https://docs.dhtmlx.com/gantt/desktop__layout_config.html)
- [Localization](https://docs.dhtmlx.com/gantt/desktop__localization.html)
- [Handling Events](https://docs.dhtmlx.com/gantt/desktop__handling_events.html)
阅读全文
相关推荐
![docx](https://img-home.csdnimg.cn/images/20241231044901.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)