@nebula.js/stardust

v2.1.0

Product and framework agnostic integration API for Qlik's Associative Engine

embed(app, instanceConfig?)

function

Initiates a new Embed instance using the specified enigma app.

Parameters

app
enigma.Doc

No description

instanceConfig

No description

Returns

No description

import { embed } from '@nebula.js/stardust'
const n = embed(app);
n.render({ id: 'abc' });

embedcreateConfiguration(configuration)

function

Creates a new embed scope bound to the specified configuration.

The configuration is merged with all previous scopes.

Parameters

configuration

The configuration object

Returns

No description

import { embed } from '@nebula.js/stardust';
// create a 'master' config which registers all types
const m = embed.createConfiguration({
  types: [{
    name: 'mekko',
    version: '1.0.0',
    load: () => Promise.resolve(mekko)
  }],
});

// create an alternate config with dark theme
// and inherit the config from the previous
const d = m.createConfiguration({
 theme: 'dark'
});

m(app).render({ type: 'mekko' }); // will render the object with default theme
d(app).render({ type: 'mekko' }); // will render the object with 'dark' theme
embed(app).render({ type: 'mekko' }); // will throw error since 'mekko' is not a register type on the default instance

useState(initialState)

function

Creates a stateful value.

Parameters

initialState
S | function

The initial state.

Returns

Array<S, SetStateFn>

The value and a function to update it.

import { useState } from '@nebula.js/stardust';
// ...
// initiate with simple primitive value
const [zoomed, setZoomed] = useState(false);

// update
setZoomed(true);

// lazy initiation
const [value, setValue] = useState(() => heavy());

useEffect(effect, deps?)

function

Triggers a callback function when a dependent value changes.

Parameters

effect

The callback.

deps
optional
Array<any>

The dependencies that should trigger the callback.

import { useEffect } from '@nebula.js/stardust';
// ...
useEffect(() => {
  console.log('mounted');
  return () => {
    console.log('unmounted');
  };
}, []);

useMemo(factory, deps)

function

Creates a stateful value when a dependent changes.

Parameters

factory
function

The factory function.

deps
Array<any>

The dependencies.

Returns

T

The value returned from the factory function.

import { useMemo } from '@nebula.js/stardust';
// ...
const v = useMemo(() => {
  return doSomeHeavyCalculation();
}), []);

usePromise(factory, deps?)

function

Runs a callback function when a dependent changes.

Parameters

factory
function

The factory function that calls the promise.

deps
optional
Array<any>

The dependencies.

Returns

Array<P, Error>

The resolved value.

import { usePromise } from '@nebula.js/stardust';
import { useModel } from '@nebula.js/stardust';
// ...
const model = useModel();
const [resolved, rejected] = usePromise(() => model.getLayout(), []);

useElement()

function

Gets the HTMLElement this visualization is rendered into.

Returns

HTMLElement

No description

import { useElement } from '@nebula.js/stardust';
// ...
const el = useElement();
el.innerHTML = 'Hello!';

useRect()

function

Gets the size of the HTMLElement the visualization is rendered into.

Returns

The size of the element.

import { useRect } from '@nebula.js/stardust';
// ...
const rect = useRect();
useEffect(() => {
  console.log('resize');
}, [rect.width, rect.height])

useLayout()

function

Gets the layout of the generic object associated with this visualization.

Returns

qae.GenericObjectLayout

No description

import { useLayout } from '@nebula.js/stardust';
// ...
const layout = useLayout();
console.log(layout);

useStaleLayout()

function

Gets the layout of the generic object associated with this visualization.

Unlike the regular layout, a stale layout is not changed when a generic object enters the modal state. This is mostly notable in that qSelectionInfo.qInSelections in the layout is always false. The returned value from useStaleLayout() and useLayout() are identical when the object is not in a modal state.

Returns

qae.GenericObjectLayout

No description

import { useStaleLayout } from '@nebula.js/stardust';
// ...
const staleLayout = useStaleLayout();
console.log(staleLayout);

useAppLayout()

function

Gets the layout of the app associated with this visualization.

Returns

qae.NxAppLayout

The app layout

import { useAppLayout } from '@nebula.js/stardust';
// ...
const appLayout = useAppLayout();
console.log(appLayout.qLocaleInfo);

useModel()

function

Gets the generic object API of the generic object connected to this visualization.

Returns

enigma.GenericObject | undefined

No description

import { useModel } from '@nebula.js/stardust';
// ...
const model = useModel();
useEffect(() => {
  model.getInfo().then(info => {
    console.log(info);
  })
}, []);

useApp()

function

Gets the doc API.

Returns

enigma.Doc | undefined

The doc API.

import { useApp } from '@nebula.js/stardust';
// ...
const app = useApp();
useEffect(() => {
  app.getAllInfos().then(infos => {
    console.log(infos);
  })
}, []);

useGlobal()

function

Gets the global API.

Returns

enigma.Global | undefined

The global API.

import { useGlobal } from '@nebula.js/stardust';

// ...
const g = useGlobal();
useEffect(() => {
  g.engineVersion().then(version => {
    console.log(version);
  })
}, []);

useSelections()

function

Gets the object selections.

Returns

The object selections.

import { useSelections } from '@nebula.js/stardust';
import { useElement } from '@nebula.js/stardust';
import { useEffect } from '@nebula.js/stardust';
// ...
const selections = useSelections();
const element = useElement();
useEffect(() => {
  const onClick = () => {
    selections.begin('/qHyperCubeDef');
  };
  element.addEventListener('click', onClick);
  return () => {
    element.removeEventListener('click', onClick);
  };
}, []);

useTheme()

function

Gets the theme.

Returns

The theme.

import { useTheme } from '@nebula.js/stardust';

const theme = useTheme();
console.log(theme.getContrastinColorTo('#ff0000'));

useEmbed()

function
experimental

Gets the embed instance used.

Returns

The embed instance used.

import { useEmbed } from '@nebula.js/stardust';

const embed = useEmbed();
embed.render(...)

useTranslator()

function

Gets the translator.

Returns

The translator.

import { useTranslator } from '@nebula.js/stardust';
// ...
const translator = useTranslator();
console.log(translator.get('SomeString'));

useDeviceType()

function

Gets the device type. ('touch' or 'desktop')

Returns

string

device type.

import { useDeviceType } from '@nebula.js/stardust';
// ...
const deviceType = useDeviceType();
if (deviceType === 'touch') { ... };

usePlugins()

function

Gets the array of plugins provided when rendering the visualization.

Returns

array of plugins.

// provide plugins that can be used when rendering
embed(app).render({
  element,
  type: 'my-chart',
  plugins: [plugin]
});
// It's up to the chart implementation to make use of plugins in any way
import { usePlugins } from '@nebula.js/stardust';
// ...
const plugins = usePlugins();
plugins.forEach((plugin) => {
  // Invoke plugin
  plugin.fn();
});

useAction(factory, deps?)

function

Registers a custom action.

Parameters

factory
function

No description

deps
optional
Array<any>

No description

Returns

A

No description

import { useAction } from '@nebula.js/stardust';
// ...
const [zoomed, setZoomed] = useState(false);
const act = useAction(() => ({
  hidden: false,
  disabled: zoomed,
  action() {
    setZoomed(prev => !prev);
  },
  icon: {}
}), [zoomed]);

useConstraints()

function

Gets the desired constraints that should be applied when rendering the visualization.

The constraints are set on the embed configuration before the visualization is rendered and should respected by you when implementing the visualization.

Returns

No description

// configure embed to disallow active interactions when rendering
embed(app, {
  constraints: {
    active: true, // do not allow interactions
  }
}).render({ element, id: 'sdfsdf' });
import { useConstraints } from '@nebula.js/stardust';
// ...
const constraints = useConstraints();
useEffect(() => {
  if (constraints.active) {
    // do not add any event listener if active constraint is set
    return undefined;
  }
  const listener = () => {};
  element.addEventListener('click', listener);
  return () => {
    element.removeEventListener('click', listener);
  };
}, [constraints])

useOptions()

function

Gets the options object provided when rendering the visualization.

This is an empty object by default but enables customization of the visualization through this object. Options are different from setting properties on the generic object in that options are only temporary settings applied to the visualization when rendered.

You have the responsibility to provide documentation of the options you support, if any.

Returns

object

No description

// when embedding the visualization, anything can be set in options
embed(app).render({
  element,
  type: 'my-chart',
  options: {
    showNavigation: true,
  }
});
// it is up to you use and implement the provided options
import { useOptions } from '@nebula.js/stardust';
import { useEffect } from '@nebula.js/stardust';
// ...
const options = useOptions();
useEffect(() => {
  if (!options.showNavigation) {
    // hide navigation
  } else {
    // show navigation
  }
}, [options.showNavigation]);

onTakeSnapshot(snapshotCallback)

function

Registers a callback that is called when a snapshot is taken.

Parameters

snapshotCallback

No description

import { onTakeSnapshot } from '@nebula.js/stardust';
import { useState } from '@nebula.js/stardust';
import { useLayout } from '@nebula.js/stardust';

const layout = useLayout();
const [zoomed] = useState(layout.isZoomed || false);

onTakeSnapshot((copyOfLayout) => {
  copyOfLayout.isZoomed = zoomed;
  return Promise.resolve(copyOfLayout);
});

useRenderState()

function
experimental

Gets render state instance.

Used to update properties and get a new layout without triggering onInitialRender.

Returns

The render state.

import { useRenderState } from '@nebula.js/stardust';

const renderState = useRenderState();
useState(() => {
  if(needProperteisUpdate(...)) {
     useRenderState.pending();
     updateProperties(...);
  } else {
     useRenderState.restore();
     ...
  }
}, [...]);

useKeyboard()

function

Gets the desired keyboard settings and status to applied when rendering the visualization. A visualization should in general only have tab stops if either keyboard.enabled is false or if active is true. This means that either Nebula isn't configured to handle keyboard input or the chart is currently focused. Enabling or disabling keyboardNavigation are set on the embed configuration and should be respected by the visualization.

Returns

experimental

No description

// configure nebula to enable navigation between charts
embed(app, {
  context: {
    keyboardNavigation: true, // tell Nebula to handle navigation
  }
}).render({ element, id: 'sdfsdf' });
import { useKeyboard } from '@nebula.js/stardust';
// ...
const keyboard = useKeyboard();
useEffect(() => {
 // Set a tab stop on our button if in focus or if Nebulas navigation is disabled
 button.setAttribute('tabIndex', keyboard.active || !keyboard.enabled ? 0 : -1);
 // If navigation is enabled and focus has shifted, lets focus the button
 keyboard.enabled && keyboard.active && button.focus();
}, [keyboard])

Context

interface

Properties

keyboardNavigation
optional
boolean

No description

constraints
optional

No description

theme
optional, default='light'
string

No description

language
optional, default='en-US'
string

No description

deviceType
optional, default='auto'
string

No description

Configuration

interface

Properties

types
optional

No description

themes
optional

No description

anything
optional
object

No description

Configurationcontext

Context

Properties

keyboardNavigation
optional
boolean

No description

constraints
optional

No description

theme
optional, default='light'
string

No description

language
optional, default='en-US'
string

No description

deviceType
optional, default='auto'
string

No description

Galaxy

interface

Properties

translator

No description

deviceType
string

No description

anything
object

No description

Galaxyflags

Flags

flagsisEnabled(flag)

function

Checks whether the specified flag is enabled.

Parameters

flag
string

The value flag to check.

Returns

boolean

True if the specified flag is enabled, false otherwise.

new Embed()

class

Embedrender(cfg)

function

Renders a visualization into an HTMLElement.

Parameters

cfg

The render configuration.

Returns

A controller to the rendered visualization.

// render from existing object
n.render({
  element: el,
  id: 'abcdef'
});
// render on the fly
n.render({
  element: el,
  type: 'barchart',
  fields: ['Product', { qLibraryId: 'u378hn', type: 'measure' }]
});

Embedcontext(ctx)

function

Updates the current context of this embed instance. Use this when you want to change some part of the current context, like theme.

Parameters

ctx

The context to update.

Returns

Promise<undefined>

No description

// change theme
n.context({ theme: 'dark'});
// limit constraints
n.context({ constraints: { active: true } });

Embedselections()

function

Gets the app selections of this instance.

Returns

No description

const selections = await n.selections();
selections.mount(element);

Embedfield(fieldIdentifier)

function

Gets the listbox instance of the specified field

Parameters

fieldIdentifier
string | LibraryField

Fieldname as a string or a Library dimension

Returns

No description

const fieldInstance = await n.field("MyField");
fieldInstance.mount(element, { title: "Hello Field"});

EmbedgetRegisteredTypes()

function

Gets a list of registered visualization types and versions

Returns

Array<Object>

types

const types = n.getRegisteredTypes();
// Contains
//[
// {
//   name: "barchart"
//   versions:[undefined, "1.2.0"]
// }
//]

new FieldInstance()

class

FieldInstancemount(element, options?)

function

Mounts the field as a listbox into the provided HTMLElement.

Parameters

element
HTMLElement

No description

options
optional

Settings for the embedded listbox

fieldInstance.mount(element);

FieldInstanceunmount()

function

Unmounts the field listbox from the DOM.

listbox.unmount();

ThemeInfo

interface

Properties

id
string

Theme identifier

ThemeInfoload()

function

A function that should return a Promise that resolves to a raw JSON theme.

Returns

Promise<ThemeJSON>

No description

new Viz()

class

A controller to further modify a visualization after it has been rendered.

Properties

id
string

The id of this visualization's generic object.

const viz = await embed(app).render({
  element,
  type: 'barchart'
});
viz.destroy();

Vizdestroy()

function

Destroys the visualization and removes it from the the DOM.

const viz = await embed(app).render({
  element,
  id: 'abc'
});
viz.destroy();

VizconvertTo(newType, forceUpdate?)

function

Converts the visualization to a different registered type

Parameters

newType
string

Which registered type to convert to.

forceUpdate
optional
boolean

Whether to run setProperties or not, defaults to true.

Returns

Promise<object>

Promise object that resolves to the full property tree of the converted visualization.

const viz = await embed(app).render({
  element,
  id: 'abc'
});
viz.convertTo('barChart');

Flags

interface

FlagsisEnabled(flag)

function

Checks whether the specified flag is enabled.

Parameters

flag
string

The value flag to check.

Returns

boolean

True if the specified flag is enabled, false otherwise.

new AppSelections()

class

AppSelectionsmount(element)

function

Mounts the app selection UI into the provided HTMLElement.

Parameters

element
HTMLElement

No description

selections.mount(element);

AppSelectionsunmount()

function

Unmounts the app selection UI from the DOM.

selections.unmount();

new ObjectSelections()

class

ObjectSelectionsbegin(paths)

function

Parameters

paths
Array<string>

No description

Returns

Promise<undefined>

No description

ObjectSelectionsclear()

function

Returns

Promise<undefined>

No description

ObjectSelectionsconfirm()

function

Returns

Promise<undefined>

No description

ObjectSelectionscancel()

function

Returns

Promise<undefined>

No description

ObjectSelectionsselect(s)

function

Parameters

s

No description

Returns

No description

ObjectSelectionscanClear()

function

Returns

boolean

No description

ObjectSelectionscanConfirm()

function

Returns

boolean

No description

ObjectSelectionscanCancel()

function

Returns

boolean

No description

ObjectSelectionsisActive()

function

Returns

boolean

No description

ObjectSelectionsisModal()

function

Returns

boolean

No description

ObjectSelectionsgoModal(paths)

function

Parameters

paths
Array<string>

No description

Returns

Promise<undefined>

No description

ObjectSelectionsnoModal(accept?)

function

Parameters

accept
optional
boolean

No description

Returns

Promise<undefined>

No description

Plugin

interface
experimental

An object literal containing meta information about the plugin and a function containing the plugin implementation.

Properties

info
experimental

Object that can hold various meta info about the plugin

const plugin = {
  info: {
    name: "example-plugin",
    type: "meta-type",
  },
  fn: () => {
    // Plugin implementation goes here
  }
};

Pluginfn

function
experimental

The implementation of the plugin. Input and return value is up to the plugin implementation to decide based on its purpose.

type Field

string | qae.NxDimension | qae.NxMeasure | LibraryField

CreateConfig

interface
extendsBaseConfig

Rendering configuration for creating and rendering a new object

Properties

type
string

No description

version
string

No description

fields
optional
Array<Field>

No description

properties
optional
qae.GenericObjectProperties

No description

BaseConfig

interface

Basic rendering configuration for rendering an object

Properties

element
HTMLElement

No description

options
optional
object

No description

plugins
optional

No description

GetConfig

interface
extendsBaseConfig

Rendering configuration for rendering an existing object

Properties

id
string

No description

LibraryField

interface

Properties

qLibraryId
string

No description

type
'dimension' | 'measure'

No description

LoadType(type)

interface

Parameters

type

No description

Returns

No description

TypeInfo

interface

Properties

name
string

No description

version
string

No description

meta
optional
object

No description

TypeInfoload(type)

LoadType

Parameters

type

No description

Returns

No description

ActionToolbarElement

interface
extendsHTMLElement

Properties

className
'njs-action-toolbar-popover'

No description

ActionElement

interface
extendsHTMLElement

Properties

className
'njs-cell-action'

No description

CellElement

interface
extendsHTMLElement

Properties

className
'njs-cell'

No description

CellFooter

interface
extendsHTMLElement

Properties

className
'njs-cell-footer'

No description

CellTitle

interface
extendsHTMLElement

Properties

className
'njs-cell-title'

No description

CellSubTitle

interface
extendsHTMLElement

Properties

className
'njs-cell-sub-title'

No description

VizElement

interface
extendsHTMLElement

Properties

attributes

No description

className
'njs-viz'

No description

Visualization(galaxy)

interface

The entry point for defining a visualization.

Parameters

galaxy

No description

Returns

No description

import { useElement, useLayout } from '@nebula.js/stardust';

export default function() {
  return {
    qae: {
      properties: {
        dude: 'Heisenberg',
      }
    },
    component() {
      const el = useElement();
      const layout = useLayout();
      el.innerHTML = `What's my name? ${layout.dude}!!!`;
    }
  };
}

VisualizationDefinition

interface

VisualizationDefinitionqae

QAEDefinition

Properties

properties
optional
qae.GenericObjectProperties

No description

data
optional

No description

qaeimportProperties(args)

importProperties

Imports properties for a chart with a hypercube.

Parameters

args

No description

Returns

Object

A properties tree

qaeexportProperties(args)

exportProperties

Exports properties for a chart with a hypercube.

Parameters

args

No description

Returns

Used for exporting and importing properties between backend models. An object that exports to ExportFormat should put dimensions and measures inside one data group. If an object has two hypercubes, each of the cubes should export dimensions and measures in two separate data groups. An object that imports from this structure is responsible for putting the existing properties where they should be in the new model.

VisualizationDefinitioncomponent()

function

Returns

void

No description

SetStateFn(newState)

interface

Parameters

newState
S | function

The new state

type EffectCallback

function

Returns

void | function

No description

Rect

interface

Properties

top
number

No description

left
number

No description

width
number

No description

height
number

No description

ActionDefinition

interface

Properties

action
A

No description

hidden
optional
boolean

No description

disabled
optional
boolean

No description

icon
optional

No description

Constraints

interface

Properties

passive
optional
boolean

Whether or not passive constraints are on. Should block any passive interaction by users, ie: tooltips

active
optional
boolean

Whether or not active constraints are on. Should block any active interaction by users, ie: scroll, click

select
optional
boolean

Whether or not active select are on. Should block any selection action. Implied when active is true.

Keyboard

interface
experimental

Properties

enabled
experimental
boolean

Whether or not Nebula handles keyboard navigation or not.

active
experimental
boolean

Set to true when the chart is activated, ie a user tabs to the chart and presses Enter or Space.

Keyboardblur()

function
experimental

Function used by the visualization to tell Nebula to it wants to relinquish focus

Keyboardfocus()

function
experimental

Function used by the visualization to tell Nebula to it wants focus

importProperties(args)

function

Imports properties for a chart with a hypercube.

Parameters

args

No description

Returns

Object

A properties tree

exportProperties(args)

function

Exports properties for a chart with a hypercube.

Parameters

args

No description

Returns

Used for exporting and importing properties between backend models. An object that exports to ExportFormat should put dimensions and measures inside one data group. If an object has two hypercubes, each of the cubes should export dimensions and measures in two separate data groups. An object that imports from this structure is responsible for putting the existing properties where they should be in the new model.

QAEDefinition

interface

Properties

properties
optional
qae.GenericObjectProperties

No description

data
optional

No description

QAEDefinitionimportProperties(args)

importProperties

Imports properties for a chart with a hypercube.

Parameters

args

No description

Returns

Object

A properties tree

QAEDefinitionexportProperties(args)

exportProperties

Exports properties for a chart with a hypercube.

Parameters

args

No description

Returns

Used for exporting and importing properties between backend models. An object that exports to ExportFormat should put dimensions and measures inside one data group. If an object has two hypercubes, each of the cubes should export dimensions and measures in two separate data groups. An object that imports from this structure is responsible for putting the existing properties where they should be in the new model.

DataTarget

interface

Properties

path
string

No description

DataTargetdimensions

FieldTarget

dimensionsmin()

function

Returns

number

No description

dimensionsmax()

function

Returns

number

No description

dimensionsadded(Type T, Type qae.GenericObjectProperties)

function

Parameters

T

No description

qae.GenericObjectProperties

No description

dimensionsremoved(Type T, Type qae.GenericObjectProperties, Type number)

function

Parameters

T

No description

qae.GenericObjectProperties

No description

number

No description

DataTargetmeasures

FieldTarget

measuresmin()

function

Returns

number

No description

measuresmax()

function

Returns

number

No description

measuresadded(Type T, Type qae.GenericObjectProperties)

function

Parameters

T

No description

qae.GenericObjectProperties

No description

measuresremoved(Type T, Type qae.GenericObjectProperties, Type number)

function

Parameters

T

No description

qae.GenericObjectProperties

No description

number

No description

FieldTarget

interface

FieldTargetmin()

function

Returns

number

No description

FieldTargetmax()

function

Returns

number

No description

FieldTargetadded(Type T, Type qae.GenericObjectProperties)

function

Parameters

T

No description

qae.GenericObjectProperties

No description

FieldTargetremoved(Type T, Type qae.GenericObjectProperties, Type number)

function

Parameters

T

No description

qae.GenericObjectProperties

No description

number

No description

new Translator()

class

Translatoradd(item)

function

Registers a string in multiple locales

Parameters

item

No description

translator.add({
  id: 'company.hello_user',
  locale: {
    'en-US': 'Hello {0}',
    'sv-SE': 'Hej {0}'
  }
});
translator.get('company.hello_user', ['John']); // Hello John

Translatorget(str, args?)

function

Translates a string for current locale.

Parameters

str
string

ID of the registered string.

args
optional
Array<string>

Values passed down for string interpolation.

Returns

string

The translated string.

new Theme()

class

ThemegetDataColorScales()

function

Returns

No description

ThemegetDataColorPalettes()

function

Returns

No description

ThemegetDataColorPickerPalettes()

function

Returns

No description

ThemegetDataColorSpecials()

function

Returns

No description

ThemegetColorPickerColor(c)

function

Resolve a color object using the color picker palette from the provided JSON theme.

Parameters

c

No description

Returns

string

The resolved color.

theme.getColorPickerColor({ index: 1 });
theme.getColorPickerColor({ color: 'red' });

ThemegetContrastingColorTo(color)

function

Get the best contrasting color against the specified color. This is typically used to find a suitable text color for a label placed on an arbitrarily colored background.

The returned colors are derived from the theme.

Parameters

color
string

A color to measure the contrast against

Returns

string
  • The color that has the best contrast against the specified color.
theme.getContrastingColorTo('#400');

ThemegetStyle(basePath, path, attribute)

function

Get the value of a style attribute in the theme by searching in the theme's JSON structure. The search starts at the specified base path and continues upwards until the value is found. If possible it will get the attribute's value using the given path.

Parameters

basePath
string

Base path in the theme's JSON structure to start the search in (specified as a name path separated by dots).

path
string

Expected path for the attribute (specified as a name path separated by dots).

attribute
string

Name of the style attribute.

Returns

string

The style value

theme.getStyle('object', 'title.main', 'fontSize'));
theme.getStyle('', '', 'fontSize'));

ThemeScalePalette

interface

Properties

key
string

No description

type
'gradient' | 'class-pyramid'

No description

colors
Array<string> | Array<Array<string>>

No description

ThemeDataPalette

interface

Properties

key
string

No description

type
'pyramid' | 'row'

No description

colors
Array<string> | Array<Array<string>>

No description

ThemeColorPickerPalette

interface

Properties

key
string

No description

colors
Array<string>

No description

ThemeDataColorSpecials

interface

Properties

primary
string

No description

nil
string

No description

others
string

No description

ExportFormat

interface

Used for exporting and importing properties between backend models. An object that exports to ExportFormat should put dimensions and measures inside one data group. If an object has two hypercubes, each of the cubes should export dimensions and measures in two separate data groups. An object that imports from this structure is responsible for putting the existing properties where they should be in the new model.

Properties

data
optional

No description

properties
optional
object

No description

ExportDataDef

interface

Properties

dimensions
Array<qae.NxDimension>

No description

measures
Array<qae.NxMeasure>

No description

excludedDimensions
Array<qae.NxDimension>

No description

excludedMeasures
Array<qae.NxMeasure>

No description

interColumnSortOrder
Array<number>

No description

ConversionType

interface

ConversionTypeimportProperties(args)

importProperties

Imports properties for a chart with a hypercube.

Parameters

args

No description

Returns

Object

A properties tree

ConversionTypeexportProperties(args)

exportProperties

Exports properties for a chart with a hypercube.

Parameters

args

No description

Returns

Used for exporting and importing properties between backend models. An object that exports to ExportFormat should put dimensions and measures inside one data group. If an object has two hypercubes, each of the cubes should export dimensions and measures in two separate data groups. An object that imports from this structure is responsible for putting the existing properties where they should be in the new model.

Conversion

interface

Provides conversion functionality to extensions.

import { conversion } from '@nebula.js/stardust';

export default function() {
  return {
    qae: {
      ...
      importProperties: ( exportFormat, initialProperties ) =>  conversion.hyperCube.importProperties(exportFormat, initialProperties),
      exportProperties: ( fullPropertyTree ) => conversion.hyperCube.exportProperties(fullPropertyTree)
    },
    ...
  };
}

Conversionhypercube

hyperCubeConversion
implementsConversionType

Provides conversion functionality to extensions with hyperCubes.

hyperCubeConversion

interface
implementsConversionType
Was this page helpful?