0.0.17 • Published 3 years ago

@anonymity94/d3-force-graph v0.0.17

Weekly downloads
-
License
MIT
Repository
github
Last release
3 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

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.15

3 years ago

0.0.16

3 years ago

0.0.17

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago