visjs/ngx-vis

"TypeError: Array or DataSet expected"

JessFairbairn opened this issue · 1 comments

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed
  • I'm reporting the issue to the correct repository

When running ngx-vis, I get the error "TypeError: Array or DataSet expected". I've used the following code to import it:

import { VisNetworkService, Data, Node, Options, Edge } from 'ngx-vis';

import {DataSet} from 'vis-data/peer';

// import { DataSet } from "vis-data/peer/esm/vis-data" // I also tried this line with the same result

Results in the terminal:

ERROR TypeError: Array or DataSet expected
value vis-network.min.js:58
setData vis-network.min.js:58
ff vis-network.min.js:58
create ngxvis.js:282
createNetwork ngxvis.js:1116
ngOnInit ngxvis.js:1077
Angular 24
RxJS 6
Angular 8

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Angular version: 13.2.3
  • Typescript version: 4.5.5

fixed in v4