Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// create ForceRadial force --------------------------------------------------------------
let forceRadial: d3Force.ForceRadial;
// Radius set only
forceRadial = d3Force.forceRadial(50);
forceRadial = d3Force.forceRadial((node, index, nodes) => {
const n: SimNode = node;
const i: number = index;
const ns: SimNode[] = nodes;
return 50 * n.group;
});
// Radius and x-coordinate of center set only
forceRadial = d3Force.forceRadial(50, 10);
forceRadial = d3Force.forceRadial(
50, // radius
(node, index, nodes) => {
const n: SimNode = node;
const i: number = index;
const ns: SimNode[] = nodes;
return 10 * n.group;
} // center-x
);
// Radius and center set
forceRadial = d3Force.forceRadial(50, 10, 10);
forceRadial = d3Force.forceRadial(
50, // radius
10, // center-x
(node, index, nodes) => {
});
// Radius and x-coordinate of center set only
forceRadial = d3Force.forceRadial(50, 10);
forceRadial = d3Force.forceRadial(
50, // radius
(node, index, nodes) => {
const n: SimNode = node;
const i: number = index;
const ns: SimNode[] = nodes;
return 10 * n.group;
} // center-x
);
// Radius and center set
forceRadial = d3Force.forceRadial(50, 10, 10);
forceRadial = d3Force.forceRadial(
50, // radius
10, // center-x
(node, index, nodes) => {
const n: SimNode = node;
const i: number = index;
const ns: SimNode[] = nodes;
return 10 * n.group;
} // center-y
);
forceRadial = d3Force.forceRadial(
(node, index, nodes) => {
const n: SimNode = node;
const i: number = index;
const ns: SimNode[] = nodes;
simNodeNumberAccessor = forcePosY.y();
// Use ForceY force -----------------------------------------------------------------
forcePosY.initialize(graph.nodes);
forcePosY(0.1); // alpha
// ForceRadial ==============================================================================
// create ForceRadial force --------------------------------------------------------------
let forceRadial: d3Force.ForceRadial;
// Radius set only
forceRadial = d3Force.forceRadial(50);
forceRadial = d3Force.forceRadial((node, index, nodes) => {
const n: SimNode = node;
const i: number = index;
const ns: SimNode[] = nodes;
return 50 * n.group;
});
// Radius and x-coordinate of center set only
forceRadial = d3Force.forceRadial(50, 10);
forceRadial = d3Force.forceRadial(
50, // radius
(node, index, nodes) => {
const n: SimNode = node;
const i: number = index;
const ns: SimNode[] = nodes;
return 10 * n.group;
} // center-x
);
// Radius and center set
forceRadial = d3Force.forceRadial(50, 10, 10);
forceRadial = d3Force.forceRadial(
50, // radius
10, // center-x
(node, index, nodes) => {
const n: SimNode = node;
const i: number = index;
const ns: SimNode[] = nodes;
return 10 * n.group;
} // center-y
);
forceRadial = d3Force.forceRadial(
(node, index, nodes) => {
const n: SimNode = node;
const i: number = index;
const ns: SimNode[] = nodes;
return 50 * n.group;
}, // radius
(node, index, nodes) => {
const n: SimNode = node;
const i: number = index;
const ns: SimNode[] = nodes;
return 10 * n.group;
}, // center-x
(node, index, nodes) => {
const n: SimNode = node;
const i: number = index;
const ns: SimNode[] = nodes;
// create ForceRadial force --------------------------------------------------------------
let forceRadial: d3Force.ForceRadial;
// Radius set only
forceRadial = d3Force.forceRadial(50);
forceRadial = d3Force.forceRadial((node, index, nodes) => {
const n: SimNode = node;
const i: number = index;
const ns: SimNode[] = nodes;
return 50 * n.group;
});
// Radius and x-coordinate of center set only
forceRadial = d3Force.forceRadial(50, 10);
forceRadial = d3Force.forceRadial(
50, // radius
(node, index, nodes) => {
const n: SimNode = node;
const i: number = index;
const ns: SimNode[] = nodes;
return 10 * n.group;
} // center-x
);
// Radius and center set
forceRadial = d3Force.forceRadial(50, 10, 10);
forceRadial = d3Force.forceRadial(
50, // radius
10, // center-x
(node, index, nodes) => {
const n: SimNode = node;