UNPKG

@nebula.js/sn-kpi

Version:

KPI supernova

40 lines (26 loc) 1.02 kB
# @nebula.js/sn-kpi A KPI supernova, based on the Qlik Sense nativa KPI object. [![Maintainability](https://qlty.sh/badges/3f3764ba-9fe4-4be4-850f-dc3e872f77f6/maintainability.svg)](https://qlty.sh/gh/qlik-trial/projects/sn-kpi) [![Code Coverage](https://qlty.sh/badges/3f3764ba-9fe4-4be4-850f-dc3e872f77f6/coverage.svg)](https://qlty.sh/gh/qlik-trial/projects/sn-kpi) ![KPI preview](./assets/preview.png) ## Contribution Instructions for developing and releasing can be found in the [contribution document](.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', }); ```