bespoke-vis

This plugin allows including visjs elements in bespoke presentations.

Loading data from a JSON file

Loading data from a JSON file

The JSON file (data.json)

{
  "groups": [
    { "id": 1, "content": "Group 1" },
    { "id": 2, "content": "Group 2" }
  ],
  "items": [
     { "group": 1, "content": "Item G1.1", "start": "2020-01-01", "type": "point" },
     { "group": 1, "content": "Item G1.2", "start": "2021-01-01", "type": "point" },
     { "group": 2, "content": "Item G2.1", "start": "2022-01-01", "type": "point" }
   ],
   "options": {
     "width": "100%",
     "height": "250px",
     "min": "2019-01-01",
     "max": "2023-01-01",
     "zoomMin": 2592000000,
     "zoomMax": 788400000000
   }
 }

Loading data in the markup