{
const dimension = group == 'region'? 'color': 'region'
const w = Math.min(width, 640);
const container = html`<div></div>`;
const chart = new G2.Chart({
container,
width: w,
animate: false
});
chart.source(data);
chart.coord().transpose();
chart.intervalStack()
.position(`${group}*percent`)
.label('percent', percent => percent.toFixed(2) + '%', {
position: 'middle',
offset: 0,
textStyle:{fill: 'white'}
})
.color(dimension)
.tooltip(false)
chart.render();
return container;
}