Hi @ishanmehta17 I read your Medium article and Visualize Knowledge Graphs using cytoscape.js and forked this repo. I use Safari on a Mac, and the code didn't work. I suspect Safari (and Firefox) don't support this:
import data from './data.json' assert { type: 'json' };
If I do this instead:
var knowledge_graph_json = {};
// https://javascript.info/fetch
let response = await fetch('./data.json');
if (response.ok) { // if HTTP-status is 200-299
knowledge_graph_json = await response.json();
} else {
alert("HTTP-Error: " + response.status);
}
Hi @ishanmehta17 I read your Medium article and Visualize Knowledge Graphs using cytoscape.js and forked this repo. I use Safari on a Mac, and the code didn't work. I suspect Safari (and Firefox) don't support this:
If I do this instead:
then it works in Chrome, Firefox, and Safari.