-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
470 additions
and
289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
## @antv/graphin-components | ||
|
||
[English](./README.md) | ||
|
||
这是 Graphin 的辅助分析 React 组件库。Graphin 是基于 [G6 3.x](https://github.com/antvis/g6) 的图分析解决方案。 | ||
|
||
主要包括: | ||
|
||
- Toolbar 工具栏 | ||
- ContextMenu 右键菜单 | ||
- 更多组件开发中... | ||
|
||
## 安装 | ||
|
||
```bash | ||
|
||
npm install @antv/graphin-components --save | ||
|
||
``` | ||
|
||
## 使用 | ||
|
||
```tsx | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import Graphin, { Utils } from '@antv/graphin'; | ||
import { Toolbar } from '@antv/graphin-components'; | ||
|
||
// 别忘了引入 CSS | ||
import '@antv/graphin/dist/index.css'; | ||
import '@antv/graphin-components/dist/index.css'; | ||
|
||
const App = () => { | ||
const data = Utils.mock(10).graphin(); | ||
return ( | ||
<div className="App"> | ||
<Graphin data={data}> | ||
<Toolbar /> | ||
</Graphin> | ||
</div> | ||
); | ||
}; | ||
|
||
const rootElement = document.getElementById('root'); | ||
ReactDOM.render(<App />, rootElement); | ||
``` | ||
|
||
## 文档 | ||
|
||
请参考 [Graphin 文档-分析组件](https://graphin.antv.vision/zh/docs/manual/main-concepts/components) | ||
|
||
## APIs | ||
|
||
请参考[Graphin 分析组件 API 文档](https://graphin.antv.vision/zh/docs/api/components) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
![](https://img.shields.io/badge/language-typescript-red.svg) | ||
![](https://img.shields.io/badge/license-MIT-000000.svg) | ||
[![npm package](https://img.shields.io/npm/v/@antv/graphin-components.svg)](https://www.npmjs.com/package/@antv/graphin) | ||
[![NPM downloads](http://img.shields.io/npm/dm/@antv/graphin.svg)](https://npmjs.org/package/@antv/graphin) | ||
[![Build Status](https://travis-ci.org/antvis/graphin.svg?branch=master)](https://travis-ci.org/antvis/graphin) | ||
|
||
## @antv/graphin-components | ||
|
||
[中文](./README-cn.ZH.md) | ||
|
||
Graphin's components lib for building graph analysis studio. Graphin is the graph analysis toolkit based on [G6 3.x](https://github.com/antvis/g6). | ||
|
||
Components list: | ||
|
||
- Toolbar | ||
- ContextMenu | ||
- More coming soon... | ||
|
||
## Install | ||
|
||
```bash | ||
|
||
npm install @antv/graphin-components --save | ||
|
||
``` | ||
|
||
## Usage | ||
|
||
```tsx | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import Graphin, { Utils } from '@antv/graphin'; | ||
import { Toolbar } from '@antv/graphin-components'; | ||
|
||
// Do not forget to import CSS | ||
import '@antv/graphin/dist/index.css'; | ||
import '@antv/graphin-components/dist/index.css'; | ||
|
||
const App = () => { | ||
const data = Utils.mock(10).graphin(); | ||
return ( | ||
<div className="App"> | ||
<Graphin data={data}> | ||
<Toolbar /> | ||
</Graphin> | ||
</div> | ||
); | ||
}; | ||
|
||
const rootElement = document.getElementById('root'); | ||
ReactDOM.render(<App />, rootElement); | ||
``` | ||
|
||
## Docs | ||
|
||
Please refer to [Graphin Docs - Components](https://graphin.antv.vision/zh/docs/manual/main-concepts/components) | ||
|
||
## APIs | ||
|
||
Please refer to [Graphin Components API Doc](https://graphin.antv.vision/zh/docs/api/components) |
Oops, something went wrong.