demoChart = {
const container = html`<canvas></canvas>`;
const type = 'bar'
const data = {
labels: ['2021-01-04', '2021-01-11', '2021-01-18'],
datasets:[
{ label: 'Low-Value', backgroundColor: 'pink', data: [10, 20, 40] },
{ label: 'High-Value', backgroundColor: 'palegreen', data: [20, 50, 100] }
]
}
const options = {
legend: { align: 'start', position: 'right' },
scales: {
xAxes: [{stacked: true}],
yAxes: [{stacked: true}],
}
}
const chart = new Chart(container, {type, data, options})
return container
}