Vis.js - 如何让 graph2d 条形图显示拉伸到终点的条形图?

Vis.js - How can I get graph2d bar chart to display bars stretched to an end point?

我想要做的是获取 graph2d 条形图,并提供像时间轴控件一样的 X2,并使矩形水平缩放。

使用 graph2d:

var graph2d = new vis.Graph2d(container, items, groups, options);

Example here

并让条形自动调整 like this

有人知道我该怎么做吗?

提前致谢。

vis.js 的此功能 has been implemented in vis.js and will be available in the upcoming version v4.19.0