0.0.17 • Published 2 years ago

@anonymity94/d3-force-graph v0.0.17

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

D3 实现 IP 访问关系图

Installation

To use it on the web:

yarn add @anonymity94/d3-force-graph
npm install @anonymity94/d3-force-graph

Quick start

import ForceGraph, { defaultLightTheme } from '@anonymity94/d3-force-graph';

const Demo = () => {
  <ForceGraph
    theme={defaultLightTheme}
    weightField="value"
    width={1800}
    height={800}
    nodes={[{ id: 'node1' }, { id: 'node2' }]}
    links={[{ source: 'node1', target: 'node2', value: 100 }]}
    nodeActions={[
      { key: 'action1', label: '操作1' },
      { key: 'action2', label: '操作2' },
    ]}
    onNodeClick={(action, node) => {
      console.log(action);
      console.log(node);
    }}
  />;
};

Dev

cd example

# install
yarn

# demo dev
yarn run start

# demo build
yarn run build

Release

git tag va.b.c
git push origin --tags 
0.0.10

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.0.15

2 years ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago