@nebula.js/sn-kpi
Version:
KPI supernova
43 lines (28 loc) • 1.31 kB
Markdown
# @nebula.js/sn-kpi
A KPI supernova, based on the Qlik Sense nativa KPI object.
[](https://circleci.com/gh/qlik-trial/sn-kpi)
[](https://codeclimate.com/repos/60c0a216875d9901b6012459/maintainability)
[](https://codeclimate.com/repos/60c0a216875d9901b6012459/test_coverage)

## Contribution
Instructions for developing and releasing can be found in the [contribution document](https://github.com/qlik-trial/sn-kpi/blob/main/.github/CONTRIBUTION.md)
## Installing
If you use npm: `npm install @nebula.js/sn-kpi`.
You can also load through the script tag directly from [https://unpkg.com](https://unpkg.com/@nebula.js/sn-kpi).
## Usage
```js
import { embed } from '@nebula.js/stardust';
import kpi from '@nebula.js/sn-kpi';
// 'app' is an enigma app model
const nuked = embed(app, {
types: [{ // register the kpi
name: 'kpi',
load: () => Promise.resolve(kpi);
}]
});
nuked.render({
element,
type: 'kpi',
});
```
[See full example](./example)