React graphs with D3
npm install react-graphie> React graphs with D3
 
``bash`
npm install --save react-graphie
`tsx
import React, { Component } from "react";
import Graph from "react-graphie";
const dataset = {
nodes: [
{ id: "Myriel", group: 1 },
{ id: "Napoleon", group: 2 },
{ id: "Mlle.Baptistine", group: 3 },
{ id: "Mme.Magloire", group: 4 }
],
links: [
{ source: "Napoleon", target: "Myriel" },
{ source: "Mlle.Baptistine", target: "Myriel" },
{ source: "Mme.Magloire", target: "Myriel" },
{ source: "Mme.Magloire", target: "Mlle.Baptistine" }
]
};
const options = {
width: 100,
height: 100
};
export default class App extends Component {
render() {
return
}
}
``
MIT © nicolascine