-
Notifications
You must be signed in to change notification settings - Fork 328
Open
Description
import NeoVis, { NEOVIS_ADVANCED_CONFIG } from 'neovis.js';
import { useEffect } from "react";
function App() {
useEffect(() => {
let neoViz;
function draw() {
const config = {
containerId: "viz",
neo4j: {
serverUrl: "bolt://localhost:7687",
serverUser: "neo4j",
serverPassword: "neo4j",
},
labels: {
Character: {
label: "name",
value: "pagerank",
group: "community",
[NEOVIS_ADVANCED_CONFIG]: {
static: {
font: '18px',
shape: 'box',
color: '#00ff00'
}
}
}
},
relationships: {
INTERACTS: {
value: "weight"
}
},
initialCypher: "MATCH (n) RETURN n limit 20" // here I'm trying to use default Movie DBMS
};
neoViz = new NeoVis.default(config);
neoViz.render();
console.log("neoViz >> ", neoViz);
}
draw();
}, [])
return (
<div className="App">
Hello
<div id="viz"></div>
</div>
);
}
export default App;
After running this I'm getting an error as -> Uncaught TypeError: neovis_js__WEBPACK_IMPORTED_MODULE_0___default(...).default is not a constructor at draw
Can you help me to correctly setup neovis in Reactjs
Metadata
Metadata
Assignees
Labels
No labels