mirror of
https://github.com/qlik-oss/nebula.js.git
synced 2025-12-19 17:58:43 -05:00
* fix: show correct bg color from theme * feat: show title styles in Nebula mashup * chore: require theme * chore: show titles in rendering test * chore: set props in test correctly * chore: set some font families * chore: add font style support * chore: fix tests * chore: update image * chore: use themed in sheet test * chore: set separate bg color for sheet * chore: proper prop * chore: set sheet baseline
62 lines
1.2 KiB
JavaScript
62 lines
1.2 KiB
JavaScript
const pie = {
|
|
component: {
|
|
mounted(el) {
|
|
// eslint-disable-next-line
|
|
el.innerHTML = '<div id="pie" style="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; height:100%; width:100%;">${env.translator.get('hello', [
|
|
'bar',
|
|
])}</div>`;
|
|
},
|
|
},
|
|
};
|
|
};
|
|
|
|
// eslint-disable-next-line
|
|
const configured = stardust.embed.createConfiguration({
|
|
context: {
|
|
language: 'sv-SE',
|
|
theme: 'bla',
|
|
},
|
|
themes: [
|
|
{
|
|
id: 'bla',
|
|
load: () =>
|
|
Promise.resolve({
|
|
_inherit: false,
|
|
color: '#fff',
|
|
object: {
|
|
backgroundColor: '#ff00ff',
|
|
},
|
|
backgroundColor: '#eeeeee',
|
|
fontSize: '20px',
|
|
fontFamily: 'Arial',
|
|
}),
|
|
},
|
|
],
|
|
types: [
|
|
{
|
|
name: 'piechart',
|
|
load: () => Promise.resolve(pie),
|
|
},
|
|
{
|
|
name: 'barchart',
|
|
load: () => Promise.resolve(bar),
|
|
},
|
|
],
|
|
});
|