【发布时间】:2021-12-16 16:05:29
【问题描述】:
如果我想今天只显示一项,则不显示任何内容,例如:(更改今天的日期)
// DOM element where the Timeline will be attached
var container = document.getElementById('visualization');
// Create a DataSet (allows two way data-binding)
var items = new vis.DataSet([
{id: 1, content: 'item 1', start: '2021-12-16'},
]);
// Configuration for the Timeline
var options = {};
// Create a Timeline
var timeline = new vis.Timeline(container, items, options);
示例代码笔:https://codepen.io/nuno-soares-the-scripter/pen/xxXqvLP
【问题讨论】:
标签: vis.js