@nx-component/hierarchy-graph
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -10,5 +10,4 @@ import { BaseNode } from './graph'; | ||
OP = 1, | ||
SERIES = 2, | ||
BRIDGE = 3, | ||
ELLIPSIS = 4 | ||
BRIDGE = 2, | ||
ELLIPSIS = 3 | ||
} | ||
@@ -15,0 +14,0 @@ export declare enum InclusionType { |
/// <reference path="types/dagre.d.ts" /> | ||
import { LayoutSetting } from './core/interface'; | ||
import { HierarchyGraphDef, HierarchyGraphNodeInfo, HierarchyGraphOption } from './interface'; | ||
export * from './interface'; | ||
export declare function buildGraph(graphDef: HierarchyGraphDef, option?: HierarchyGraphOption): HierarchyGraphNodeInfo; | ||
export declare function buildGraph(graphDef: HierarchyGraphDef, option?: HierarchyGraphOption, setting?: LayoutSetting): HierarchyGraphNodeInfo; |
@@ -29,3 +29,3 @@ export declare enum HierarchyNodeType { | ||
edges: HierarchyGraphEdgeDef[]; | ||
compound: HierarchyGraphCompoundDef; | ||
compound?: HierarchyGraphCompoundDef; | ||
} | ||
@@ -32,0 +32,0 @@ export interface HierarchyBaseNodeInfo { |
export * from './interface'; | ||
export * from './core/interface'; | ||
export * from './hierarchy-graph'; |
{ | ||
"name": "@nx-component/hierarchy-graph", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "", | ||
"keywords": [], | ||
"keywords": [ | ||
"graph", | ||
"layout" | ||
], | ||
"main": "dist/hierarchy-graph.umd.js", | ||
@@ -7,0 +10,0 @@ "module": "dist/hierarchy-graph.es5.js", |
# Hierarchy Graph | ||
English | [简体中文](README-zh_CN.md) | ||
## 🖥 Environment Support | ||
* dagre `^0.8.5` [![npm package](https://img.shields.io/npm/v/dagre.svg?style=flat-square)](https://www.npmjs.com/package/dagre) | ||
## 📦 Installation | ||
```bash | ||
$ npm i @nx-component/hierarchy-graph | ||
``` | ||
## 🔨 Usage | ||
```ts | ||
import { buildGraph, HierarchyGraphNodeInfo } from '@nx-component/hierarchy-graph'; | ||
const data = { | ||
nodes: [ | ||
{ id: '0-1'}, | ||
{ id: '0-2'}, | ||
{ id: '1-1'}, | ||
{ id: '1-2'}, | ||
], | ||
edges: [ | ||
{ v: '0-1', w: '0-2' }, | ||
{ v: '0-2', w: '1-1' }, | ||
{ v: '1-1', w: '1-2' } | ||
], | ||
compound: { | ||
GROUP0: ['0-1', '0-2'] | ||
} | ||
} | ||
const renderInfo: HierarchyGraphNodeInfo = buildGraph(data); | ||
``` |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
189910
1149
36