Published
Edited
Feb 9, 2021
1 fork
Importers
Insert cell
Insert cell
chart = {
const container = html`<canvas></canvas>`;
const myChart = new Chart(container, {
type: 'line',
data: {
labels: ['2 Weeks Ago', '1 Week Ago', 'This week'],
datasets: [{
label: '# of Users',
data: [12, 100, 40],
fill: true,
backgroundColor:'rgba(20, 20, 132, 0.2)',
borderColor: 'rgba(20, 20, 132, 1)',
borderWidth: 2
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
}
});
return container;
}
Insert cell
Chart = require('https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.bundle.min.js')
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more