{
const data = [
{category: 'Sky', value: 75, order: 3},
{category: 'Shady side of a pyramid', value: 10, order: 1},
{category: 'Sunny side of a pyramid', value: 15, order: 2}
];
const colors = {
domain: ['Sky', 'Shady side of a pyramid', 'Sunny side of a pyramid'],
range: ['#416D9D', '#674028', '#DEAC58']
};
return vl.markArc({outerRadius: 150})
.description('Reproducing http://robslink.com/SAS/democd91/pyramid_pie.htm')
.data(data)
.encode(
vl.theta().fieldQ('value').stack(true).scale({range: [0.75 * Math.PI, 2.75 * Math.PI]}),
vl.color().fieldN('category').title(null).scale(colors).legend({orient: 'right'}),
vl.order().fieldO('order')
)
.config({view: {stroke: null}})
.width(300)
.height(300)
.render();
}