diff --git a/types/vis/index.d.ts b/types/vis/index.d.ts index 66542e8263..216f47f212 100644 --- a/types/vis/index.d.ts +++ b/types/vis/index.d.ts @@ -107,8 +107,10 @@ export interface DataGroup { style?: string; subgroupOrder?: string | (() => void); title?: string; - nestedGroups?: number[]; + nestedGroups?: IdType[]; subgroupStack?: SubGroupStackOptions | boolean; + visible?: boolean; + showNested?: boolean; } export interface DataGroupOptions { diff --git a/types/vis/vis-tests.ts b/types/vis/vis-tests.ts index b97d35b04a..6b1c47d050 100644 --- a/types/vis/vis-tests.ts +++ b/types/vis/vis-tests.ts @@ -147,6 +147,16 @@ const positiveBalance = dataset.get({ } }); +// DataGroup test +const groups = [ + {id: "1", content: "group 1", visible: true}, + {id: "2", content: "group 2", visible: false}, + {id: "3", content: "parent group", nestedGroups: [ "1", "2" ], visible: false, showNested: true} +]; + +const timelineContainer = document.getElementById('timeline'); +const timeline = new vis.Timeline(timelineContainer, [], groups); + // // Test code sample from Getting Started http://visjs.org/docs/network/ //