Files
nebula.js/test/rendering/sheet/sheet-data.js
Tobias Åström 65af64044c feat: chart bg colors and title styles from properties and theme (#1183)
* 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
2023-03-28 18:16:25 +02:00

77 lines
1.6 KiB
JavaScript

/* eslint arrow-body-style: 0 */
window.getFuncs = function getFuncs() {
return {
getSheetLayout: () => {
return {
qInfo: {
qId: 'sheet',
},
visualization: 'sheet',
cells: [
{
name: 'bar',
bounds: {
x: 0,
y: 0,
width: 50,
height: 50,
},
},
{
name: 'pie',
bounds: {
x: 50,
y: 50,
width: 50,
height: 50,
},
},
],
};
},
getBarLayout: () => {
return {
qInfo: {
qId: 'bar',
},
visualization: 'barchart',
title: 'This is the title of the barchart',
subtitle: 'here is the subtitle',
footnote: 'and here is a footnote',
showTitles: true,
components: [
{
key: 'general',
title: {
main: {
color: { color: 'green' },
fontFamily: 'Verdana',
},
subTitle: {
color: { color: 'blue' },
fontStyle: ['bold', 'italic', 'underline'],
},
footer: {
color: { color: 'red' },
fontFamily: 'Lucida Console, monospace',
},
},
bgColor: {
color: { color: '#00ff00' },
},
},
],
};
},
getPieLayout: () => {
return {
qInfo: {
qId: 'pie',
},
visualization: 'piechart',
};
},
};
};