@nebula.js/sn-mekko-chart

1.4.1 • Public • Published

sn-mekko-chart

A basic mekko chart supernova aimed to be used in nebula.js.

mekko chart preview

import { embed } from '@nebula.js/stardust';
import mekko from '@nebula.js/sn-mekko-chart';

// 'app' is an enigma app model
const embeddable = embed(app, {
  types: [{ // register the mekko chart
    name: 'mekko',
    load: () => Promise.resolve(mekko);
  }]
});

embeddable.render({
  element,
  type: 'mekko',
  fields: ['Region', 'Fiscal Year', '=Sum(Sales)'],
});

Requirements

Requires @nebula.js/stardust version >=1.7.0.

Installing

If you use npm: npm install @nebula.js/sn-mekko-chart. You can also load through the script tag directly from any of the CDNs that supports NPM packages, for example: unpkg.

More examples

Color by dimension

In this example the first dimension (Region) is used to color each cell.

mekko chart color by dimension

embeddable.render({
  element,
  type: "mekko",
  fields: ["Region", "Fiscal Year", "=Sum(Sales)"],
  properties: {
    cellColor: {
      mode: "byDimension",
      byDimension: { type: "index", typeValue: 0 },
    },
  },
});

API

The API specifiction is available at Qlik Developer Portal

/@nebula.js/sn-mekko-chart/

    Package Sidebar

    Install

    npm i @nebula.js/sn-mekko-chart

    Weekly Downloads

    1,353

    Version

    1.4.1

    License

    MIT

    Unpacked Size

    5.86 MB

    Total Files

    15

    Last publish

    Collaborators

    • nilzona_user
    • niekvanstaveren
    • likang6688
    • ccm33
    • qlikossbuild
    • veinfors
    • tobias-astrom-qlik