Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
*/
import React from 'react'
import range from 'lodash/range'
import { ResponsiveVoronoi, VoronoiDefaultProps } from '@nivo/voronoi'
import ComponentTemplate from '../../components/components/ComponentTemplate'
import meta from '../../data/components/voronoi/meta.yml'
import { groups } from '../../data/components/voronoi/props'
const xDomain = [0, 100]
const yDomain = [0, 100]
const generateData = () =>
range(100).map(id => ({ id, x: Math.random() * xDomain[1], y: Math.random() * yDomain[1] }))
const initialProperties = {
...ResponsiveVoronoi.defaultProps,
xDomain,
yDomain,
margin: {
top: 1,
right: 1,
bottom: 1,
left: 1,
},
enableLinks: true,
linkLineWidth: 1,
linkLineColor: '#cccccc',
enableCells: true,