superset/superset-frontend/temporary_superset_ui/superset-ui/plugins/legacy-plugin-chart-country-map/README.md

34 lines
1.1 KiB
Markdown
Raw Normal View History

2019-01-31 19:56:17 -05:00
## @superset-ui/legacy-plugin-chart-country-map
[![Version](https://img.shields.io/npm/v/@superset-ui/legacy-plugin-chart-country-map.svg?style=flat-square)](https://www.npmjs.com/package/@superset-ui/legacy-plugin-chart-country-map)
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-country-map&style=flat-square)](https://david-dm.org/apache-superset/superset-ui-plugins?path=packages/superset-ui-legacy-plugin-chart-country-map)
2019-01-31 19:56:17 -05:00
This plugin provides Country Map for Superset.
### Usage
2020-12-10 16:58:10 -05:00
Configure `key`, which can be any `string`, and register the plugin. This `key` will be used to
lookup this chart throughout the app.
2019-01-31 19:56:17 -05:00
```js
import CountryMapChartPlugin from '@superset-ui/legacy-plugin-chart-country-map';
2020-12-10 16:58:10 -05:00
new CountryMapChartPlugin().configure({ key: 'country-map' }).register();
2019-01-31 19:56:17 -05:00
```
2020-12-10 16:58:10 -05:00
Then use it via `SuperChart`. See
[storybook](https://apache-superset.github.io/superset-ui-plugins/?selectedKind=plugin-chart-country-map)
for more details.
2019-01-31 19:56:17 -05:00
```js
<SuperChart
chartType="country-map"
width={600}
height={600}
formData={...}
queriesData={[{
data: {...},
}]}
2019-01-31 19:56:17 -05:00
/>
2020-12-10 16:58:10 -05:00
```