Published
Edited
Mar 16, 2020
1 fork
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{
const container = html`<div></div>`;
const chart = new G2.Chart({
container,
width: Math.min(width, 640),
animate: false
});
chart.source(data);
chart.coord().transpose();
chart.axis('1', false);
chart.axis('count', false);
chart.intervalStack().position('1*count').color('item');
chart.render();
return container;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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