@nebula.js/sn-word-cloud
v1.1.0
Published
A graphic representation of a text dimension where size is based on the measure value
Downloads
3,941
Keywords
Readme
sn-word-cloud
A word cloud chart aimed to be used in nebula.js built using d3 and d3-cloud.
This extension is part of the extension bundles for Qlik Sense. The repository is maintained and moderated by Qlik R&D.
Requirements
Requires @nebula.js/stardust version 2.0.0 or later.
Installing
If you use npm: npm install @nebula.js/sn-word-cloud.
You can also load through the script tag directly from https://unpkg.com.
Usage
import { embed } from "@nebula.js/stardust";
import word from "@nebula.js/sn-word-cloud";
// 'app' is an enigma app model
const nuked = embed(app, {
types: [
{
// register word cloud - qlik-word-cloud is the default name in sense
name: "qlik-word-cloud",
load: () => Promise.resolve(wordcloud),
},
],
});
// Rendering a simple word cloud
nuked.render({
element: document.querySelector(".wordCloud"),
type: "qlik-word-cloud",
fields: ["WordsField", "=Sum(SizeField)"],
properties: {
title: "Word cloud",
},
});Development
Use Node.js 24 or later and the pnpm version declared in package.json.
pnpm install
pnpm typecheck
pnpm test:unit
pnpm lint
pnpm build
pnpm exec playwright install chromium firefox
pnpm test:e2eApplication and test sources are TypeScript. Property and layout types are generated
from TypeSpec into tsp-output/types.ts; run pnpm generate rather than editing
generated files. Typechecking, unit tests, production builds, and API-spec generation
generate their inputs automatically.
Nebula's configuration and the legacy API-spec configuration remain JavaScript for
their loaders. Nebula also requires .fix.js fixture entries; these import the
TypeScript fixture implementations. The legacy JSDoc generator reads temporary
JavaScript emitted into .tmp/spec. Existing screenshot baselines target Linux.
TypeScript is kept on version 6 because the Nebula Rollup plugin uses its compiler API.
License
@nebula.js/sn-word-cloud is MIT licensed.
