0.1.1 • Published 5 years ago

rv-graph v0.1.1

Weekly downloads
8
License
-
Repository
-
Last release
5 years ago

rv-graph

基于 vis-networkreact 可视化网络图库。

Install

$ npm i -S rv-graph

Component Props

nametyperequireddefaultdescription
graphobject{nodes: object[], edges: object[]}{nodes: [], edges: []}关系图的节点数据集和边数据集, 配置详见 nodes / edges
optionsobject详见 util.js关系图配置项,详见 vis-network-options
eventsobject{}关系图事件,详见 vis-network-events
identifierstringuuid.v4()组件渲染节点的样式 id
classNamestring组件 className
styleobject{width: '100%', height: '100%'}组件样式

Ref Props

rv-graph 提供感知和操作关系图的能力,对于组件实例提供以下属性

nametypedescription
networkobject底层关系图对象,提供的操作详见 vis-network-methods
nodesobject底层关系图节点对象,提供的操作详见 vis-nodes-methods
edgesobject底层关系图边对象,提供的操作详见 vis-edges-methods

Example

rv-graphvis-network
base-usagehttp://visjs.org/examples/network/basicUsage.html
node-iconhttp://visjs.org/examples/network/nodeStyles/icons.html
hierarchyhttp://visjs.org/examples/network/layout/hierarchicalLayout.html

Notice