Package and core build

Each chart package is a self sustained visualization, only requiring nebula.js and an active sense app connection to work. Each package contains a few builds, targeted at different types of deployment

Package contents

A package contains the following folders and files, with some local differences.

Example from sn-pie-chart: https://unpkg.com/browse/@nebula.js/sn-pie-chart@1.9.1/

├── LICENSE
├── README.md
├── package.json
├── api-specifications
│   ├── api.md
│   ├── plugins.json
│   ├── plugins.md
│   └── properties.json
├── core
│   ├── esm
│   │   └── index.js
│   └── package.json
├── dist
│   └── sn-pie-chart.js
└── sn-pie-chart-ext
    ├── dist
    │   └── sn-pie-chart.js
    ├── sn-pie-chart.js
    └── sn-pie-chart.qext

Folders

  • api-specifications

Contains the properties specification for the chart, used to generate its documentation on this site.

  • core

A slimmed down version of the chart build, where some dependencies are set as external. Allowing for more optimized builds. This is used when importing the chart as ES modules.

  • dist

Regular chart build, content here is what you get when importing using a regular script tag.

  • sn-name-chart-ext

Build for direct import into Sense. Generally includes the same code as dist, but with the added .qext file for registration with the sense client.

Using the core build

When building full mashups using multiple charts, or even all of them, it is recommended to use the core packages of each chart. This can greatly redude the overall size of your bundle, thus reducing the amount of code that needs to be downloaded and ran.

This requires a bundler such as webpack, as using the core package with script tags is not recommended.

A few examples on how to achive this can be found here:

Was this page helpful?