@nebula.js/sn-shape
v1.9.0
Published
Add vertical or horizontal lines with adjustable color and size. Use lines to divide objects, group parts, or to add flair to your dashboard.
Readme
sn-shape
A basic shape chart supernova aimed to be used in nebula.js.
import { embed } from '@nebula.js/stardust';
import shape from '@nebula.js/sn-shape';
// 'app' is an enigma app model
const embeddable = embed(app, {
types: [{ // register the shape chart
name: 'shape',
load: () => Promise.resolve(shape);
}]
});
embeddable.render({
element,
type: 'shape',
properties: {
shape: {
type: "line",
orientation: "vertical",
style: {
width: 3,
color: {
color: "#ff00ff",
},
}
}
}
});Requirements
Requires @nebula.js/stardust version >=3.0.0.
Installing
If you use npm: npm install @nebula.js/sn-shape. You can also load through the script tag directly from any of the CDNs that supports NPM packages, for example: unpkg.
Building
Run pnpm install before building. Installation runs the prepare script (pnpm run generate) to generate the TypeSpec outputs, including the JSON Schema at tsp-output/@typespec/json-schema/sn-shape.json.
Run pnpm generate again after changing the TypeSpec definitions or if installation was run with lifecycle scripts disabled (for example, pnpm install --ignore-scripts). Generated outputs are ignored by Git, so a fresh checkout needs this installation step before building, including in CI.
Both production and development builds run node tools/copy-json-schema.js after building the extension. This copies the existing schema to api-specification/sn-shape.json without regenerating the TypeSpec outputs, so generation must complete first.
For a production build, run:
pnpm buildFor a development build, run:
pnpm build:devTo copy the schema without generating outputs or building the extension, run:
node tools/copy-json-schema.jsRelease
To trigger a release, manually run the "Create release" workflow on a release branch. For more info on actions / github workflows see: https://github.com/qlik-oss/sn-gh-workflows/
