的配置选项似乎在 vis.js 时间轴中cluster不起作用
以下是我使用 TypeScript 进行设置的方式:
const options = {
height: '400px',
zoomMin: 5000,
stack: true,
cluster: {
showStipes: true,
maxItems: 2,
},
template: (item, element, data) => {
return this.timelineItemService.toHTMLElement(
this.timelineItemComponents.filter((x) => x.instance.id === item.id)[0]);
}
};
const groups = [
{ id: 'Item', content: 'Item' },
{ id: 'Event', content: 'Event' },
];
this.contentElement.subscribe((domEl) => {
this.timeline = new vis.Timeline(domEl, items, groups, options);
... other code omitted ...
在调试控制台中,我收到此错误:
Unknown option detected: "cluster" in
options = {
cluster
}
Perhaps it was misplaced?
Matching option found at: options = {
configure: {
filter
}
}
是我设置不正确还是该选项有问题?我所做的一切都是渲染和正常工作。