mirror of
https://github.com/qlik-oss/nebula.js.git
synced 2025-12-19 17:58:43 -05:00
* feat: add basic sheet rendering support * chore: add missing file * fix: correct bg colors for none support * chore: fix test that relied on dark bg * chore: fix ref * chore: api spec update * chore: add todo comments * chore: use memo * chore: a bit less verbose * chore: list * chore: cleaning * chore: add rendering test * chore: enable rendering test * chore: settings * chore: settings * chore: disable rendering tests * chore: revert test tests
46 lines
921 B
JavaScript
46 lines
921 B
JavaScript
const pie = {
|
|
component: {
|
|
mounted(el) {
|
|
// eslint-disable-next-line
|
|
el.innerHTML = '<div id="pie" style="background: aliceblue; height:100%; width:100%;">Hello pie</div>';
|
|
},
|
|
},
|
|
};
|
|
|
|
const bar = function (env) {
|
|
env.translator.add({
|
|
id: 'hello',
|
|
locale: {
|
|
'sv-SE': 'Hej {0}!',
|
|
},
|
|
});
|
|
return {
|
|
component: {
|
|
mounted(el) {
|
|
// eslint-disable-next-line
|
|
el.innerHTML = `<div id="bar" style="font-size: 64px; background: tan; height:100%; width:100%;">${env.translator.get(
|
|
'hello',
|
|
['bar']
|
|
)}</div>`;
|
|
},
|
|
},
|
|
};
|
|
};
|
|
|
|
// eslint-disable-next-line
|
|
const configured = stardust.embed.createConfiguration({
|
|
context: {
|
|
language: 'sv-SE',
|
|
},
|
|
types: [
|
|
{
|
|
name: 'piechart',
|
|
load: () => Promise.resolve(pie),
|
|
},
|
|
{
|
|
name: 'barchart',
|
|
load: () => Promise.resolve(bar),
|
|
},
|
|
],
|
|
});
|