superset/superset-frontend/temporary_superset_ui/superset-ui/plugins/superset-ui-plugins/packages/superset-ui-legacy-plugin-chart-force-directed/README.md

34 lines
1.2 KiB
Markdown
Raw Normal View History

2019-01-29 20:33:16 -05:00
## @superset-ui/legacy-plugin-chart-force-directed
[![Version](https://img.shields.io/npm/v/@superset-ui/legacy-plugin-chart-force-directed.svg?style=flat-square)](https://img.shields.io/npm/v/@superset-ui/legacy-plugin-chart-force-directed.svg?style=flat-square)
2019-02-25 16:39:53 -05:00
[![David (path)](https://img.shields.io/david/apache-superset/superset-ui-plugins.svg?path=packages%2Fsuperset-ui-legacy-plugin-chart-force-directed&style=flat-square)](https://david-dm.org/apache-superset/superset-ui-plugins?path=packages/superset-ui-legacy-plugin-chart-force-directed)
2019-01-29 20:33:16 -05:00
This plugin provides Force-directed Graph for Superset.
### Usage
Configure `key`, which can be any `string`, and register the plugin. This `key` will be used to lookup this chart throughout the app.
```js
import ChordChartPlugin from '@superset-ui/legacy-plugin-chart-force-directed';
new ChordChartPlugin()
.configure({ key: 'force-directed' })
.register();
```
Then use it via `SuperChart`. See [storybook](https://apache-superset.github.io/superset-ui-plugins/?selectedKind=plugin-chart-force-directed) for more details.
2019-01-29 20:33:16 -05:00
```js
<SuperChart
chartType="force-directed"
chartProps={{
width: 600,
height: 600,
formData: {...},
payload: {
data: {...},
},
}}
/>
```