mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
* chore: add commit message * update learn * update superset-ui-demo * move superset-ui into peerDeps * add --no-private argument in lerna version * fix conflicts * refresh lock file
## superset-plugin-chart-<%= packageName %>
This plugin provides <%= description %> 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 <%= packageLabel %>ChartPlugin from '@superset-ui/plugin-chart-<%= packageName %>';
new <%= packageLabel %>ChartPlugin()
.configure({ key: '<%= packageName %>' })
.register();
```
Then use it via `SuperChart`. See [storybook](https://apache-superset.github.io/superset-ui/?selectedKind=plugin-chart-<%= packageName %>) for more details.
```js
<SuperChart
chartType="<%= packageName %>"
width={600}
height={600}
formData={...}
queriesData={[{
data: {...},
}]}
/>
```
### File structure generated
```
├── package.json
├── README.md
├── tsconfig.json
├── src
│ ├── <%= packageLabel %>.tsx
│ ├── images
│ │ └── thumbnail.png
│ ├── index.ts
│ ├── plugin
│ │ ├── buildQuery.ts
│ │ ├── controlPanel.ts
│ │ ├── index.ts
│ │ └── transformProps.ts
│ └── types.ts
├── test
│ └── index.test.ts
└── types
└── external.d.ts
```