Skip to content

Commit

Permalink
feat(network): fix codesandbox example
Browse files Browse the repository at this point in the history
  • Loading branch information
plouc committed Dec 31, 2021
1 parent ca5ee4e commit cda6683
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/codesandbox/src/charts/Network.tsx
Expand Up @@ -9,16 +9,16 @@ import { useChart } from '../hooks'
const props = {
iterations: 60,
margin: { bottom: 30, top: 30, left: 30, right: 30 },
nodeColor: (node: ComputedNode) => node.color,
nodeColor: (node: ComputedNode<any>) => node.color,
repulsivity: 6,
}

export function Network() {
const [data, flavor] = useChart(generateNetworkData)

if (flavor === 'canvas') {
return <ResponsiveNetworkCanvas {...data} {...props} />
return <ResponsiveNetworkCanvas data={data} {...props} />
}

return <ResponsiveNetwork {...data} {...props} />
return <ResponsiveNetwork data={data} {...props} />
}

0 comments on commit cda6683

Please sign in to comment.