2019-02-25 19:28:40 -05:00
## @superset-ui/preset-chart-xy
2019-02-15 16:15:36 -05:00
2019-02-25 19:28:40 -05:00
[![Version ](https://img.shields.io/npm/v/@superset-ui/preset-chart-xy.svg?style=flat-square )](https://img.shields.io/npm/v/@superset-ui/preset-chart-xy.svg?style=flat-square)
[![David (path) ](https://img.shields.io/david/apache-superset/superset-ui-plugins.svg?path=packages%2Fsuperset-ui-preset-chart-xy&style=flat-square )](https://david-dm.org/apache-superset/superset-ui-plugins?path=packages/superset-ui-preset-chart-xy)
2019-02-15 16:15:36 -05:00
2019-03-28 19:58:22 -04:00
This plugin provides basic charts on cartesian coordinates (Line, Box Plot) for Superset.
> DISCLAIMER: It is still under heavy development and the APIs are subject to changes.
2019-02-15 16:15:36 -05:00
### 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
2019-02-25 19:28:40 -05:00
import { BoxPlotChartPlugin } from '@superset-ui/preset-chart-xy';
2019-02-15 16:15:36 -05:00
new BoxPlotChartPlugin()
.configure({ key: 'box-plot' })
.register();
```
2019-02-25 19:31:03 -05:00
Then use it via `SuperChart` . See [storybook ](https://apache-superset.github.io/superset-ui-plugins/?selectedKind=plugin-chart-box-plot ) for more details.
2019-02-15 16:15:36 -05:00
```js
< SuperChart
chartType="box-plot"
2019-08-26 15:07:28 -04:00
width={600}
height={600}
formData={...}
queryData={{
data: {...},
2019-02-15 16:15:36 -05:00
}}
/>
2019-09-19 21:21:42 -04:00
```