1 | # stardust
|
2 |
|
3 | Stardust is a JavaScript library for building and embedding visualizations on top of Qlik's Associative Engine.
|
4 |
|
5 | ## Installation
|
6 |
|
7 | ```sh
|
8 | npm install @nebula.js/stardust
|
9 | ```
|
10 |
|
11 | ## Example usage
|
12 |
|
13 | ```js
|
14 | import { embed } from '@nebula.js/stardust';
|
15 | import mekko from '@nebula.js/sn-mekko-chart';
|
16 |
|
17 | const orion = embed.createConfiguration({
|
18 | types: [{
|
19 | name: 'mekko',
|
20 | load: () => Promise.resolve(mekko);
|
21 | }]
|
22 | })(app);
|
23 |
|
24 | orion.render({
|
25 | element,
|
26 | type: 'mekko',
|
27 | fields: ['Product', 'Region', 'Sales']
|
28 | });
|
29 | ```
|
30 |
|
31 | ## Typescript
|
32 |
|
33 | Stardust comes with typescript definitions. It references the Qlik's Engine definitions published at @types/qlik-engineapi.
|
34 |
|
35 | When installing Stardust it also installs the package @types/qlik-engineapi. Use [overrides](https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides) in your package.json if the installed version deviates from the Qlik Engine you are using:
|
36 |
|
37 | ```json
|
38 | {
|
39 | "overrides": {
|
40 | "@types/qlik-engineapi": "<your-engine-version>"
|
41 | },
|
42 | ...
|
43 | }
|
44 | ```
|