UNPKG

@cbinsights/react-d3-graph

Version:

React component to build interactive and configurable graphs with d3 effortlessly

247 lines (246 loc) 4.73 kB
export default { nodes: [ { id: 'Harry', x: '40', y: '200' }, { id: 'Sally', x: '140', y: '20' }, { id: 'Mario', x: '20', y: '110' }, { id: 'Sarah', x: '30', y: '184' }, { id: 'Alice', x: '305', y: '745' }, { id: 'Eveie', x: '200', y: '300' }, { id: 'Peter', x: '120', y: '270' }, { id: 'James', x: '190', y: '609' }, { id: 'Carol', x: '101', y: '201' }, { id: 'Nicky', x: '2', y: '200' }, { id: 'Bobby', x: '404', y: '404' }, { id: 'Frank', x: '14', y: '30' }, { id: 'Lynne', x: '14', y: '250' }, { id: 'Roger', x: '14', y: '259' }, { id: 'Maddy', x: '409', y: '500' }, { id: 'Sonny', x: '520', y: '123' }, { id: 'Johan', x: '14', y: '20' }, { id: 'Henry', x: '20', y: '1' }, { id: 'Mikey', x: '90', y: '90' }, { id: 'Elric', x: '90', y: '656' } ], links: [ { source: 'Harry', target: 'Sally', value: '1.2' }, { source: 'Harry', target: 'Mario', value: '1.3' }, { source: 'Sarah', target: 'Alice', value: '0.2' }, { source: 'Eveie', target: 'Alice', value: '0.5' }, { source: 'Peter', target: 'Alice', value: '1.6' }, { source: 'Mario', target: 'Alice', value: '0.4' }, { source: 'James', target: 'Alice', value: '0.6' }, { source: 'Harry', target: 'Carol', value: '0.7' }, { source: 'Harry', target: 'Nicky', value: '0.8' }, { source: 'Bobby', target: 'Frank', value: '0.8' }, { source: 'Alice', target: 'Mario', value: '0.7' }, { source: 'Harry', target: 'Lynne', value: '0.5' }, { source: 'Sarah', target: 'James', value: '1.9' }, { source: 'Roger', target: 'James', value: '1.1' }, { source: 'Maddy', target: 'James', value: '0.3' }, { source: 'Sonny', target: 'Roger', value: '0.5' }, { source: 'James', target: 'Roger', value: '1.5' }, { source: 'Alice', target: 'Peter', value: '1.1' }, { source: 'Johan', target: 'Peter', value: '1.6' }, { source: 'Alice', target: 'Eveie', value: '0.5' }, { source: 'Harry', target: 'Eveie', value: '0.1' }, { source: 'Eveie', target: 'Harry', value: '2.0' }, { source: 'Henry', target: 'Mikey', value: '0.4' }, { source: 'Elric', target: 'Mikey', value: '0.6' }, { source: 'James', target: 'Sarah', value: '1.5' }, { source: 'Alice', target: 'Sarah', value: '0.6' }, { source: 'James', target: 'Maddy', value: '0.5' }, { source: 'Peter', target: 'Johan', value: '0.7' } ] };