Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import {UndirectedGraph} from 'graphology';
import WebGLRenderer from '../src/renderers/webgl';
import circularLayout from 'graphology-layout/circular';
import {animateNodes} from '../src/animate.js';
import {scaleLinear} from 'd3-scale';
import extent from 'simple-statistics/src/extent';
import miserables from './resources/les-miserables.json';
const nodeSizeExtent = extent(miserables.nodes.map(n => n.size));
const xExtent = extent(miserables.nodes.map(n => n.x));
const yExtent = extent(miserables.nodes.map(n => n.y));
const nodeSizeScale = scaleLinear()
.domain(nodeSizeExtent)
.range([3, 15]);
const xScale = scaleLinear()
.domain(xExtent)
.range([0, 1]);
const yScale = scaleLinear()
.domain(yExtent)
.range([0, 1]);
const graph = new UndirectedGraph();
import {UndirectedGraph} from 'graphology';
import WebGLRenderer from '../src/renderers/webgl';
import circularLayout from 'graphology-layout/circular';
import {animateNodes} from '../src/animate.js';
import {scaleLinear} from 'd3-scale';
import extent from 'simple-statistics/src/extent';
import miserables from './resources/les-miserables.json';
const nodeSizeExtent = extent(miserables.nodes.map(n => n.size));
const xExtent = extent(miserables.nodes.map(n => n.x));
const yExtent = extent(miserables.nodes.map(n => n.y));
const nodeSizeScale = scaleLinear()
.domain(nodeSizeExtent)
.range([3, 15]);
const xScale = scaleLinear()
.domain(xExtent)
.range([0, 1]);
const yScale = scaleLinear()
.domain(yExtent)
.range([0, 1]);
const graph = new UndirectedGraph();
miserables.nodes.forEach((node, i) => {
import {UndirectedGraph} from 'graphology';
import WebGLRenderer from '../src/renderers/webgl';
import circularLayout from 'graphology-layout/circular';
import {animateNodes} from '../src/animate.js';
import {scaleLinear} from 'd3-scale';
import extent from 'simple-statistics/src/extent';
import miserables from './resources/les-miserables.json';
const nodeSizeExtent = extent(miserables.nodes.map(n => n.size));
const xExtent = extent(miserables.nodes.map(n => n.x));
const yExtent = extent(miserables.nodes.map(n => n.y));
const nodeSizeScale = scaleLinear()
.domain(nodeSizeExtent)
.range([3, 15]);
const xScale = scaleLinear()
.domain(xExtent)
.range([0, 1]);
const yScale = scaleLinear()
.domain(yExtent)
.range([0, 1]);
const graph = new UndirectedGraph();