<div id="container"></div>
html, body, #container {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
anychart.onDocumentReady(function () {
// create pie chart with passed data
var chart = anychart.pie([
['转供损失数', 10],
['转供成功', 13],
/* ['Mascara', 102610],
['Lip gloss', 110430],
['Lipstick', 128000],
['Nail polish', 143760]*/
]);
// create range color palette with color ranged between light blue and dark blue
var palette = anychart.palettes.rangeColors();
palette.items([
{color: '#64b5f6'},
{color: '#455a64'}
// set chart title text settings
chart.title('ACME corp. sales chart. The share of products.')
//set chart radius
.innerRadius('40%')
// set palette to the chart
.palette(palette);
// set container id for the chart
chart.container('container');
// initiate chart drawing
chart.draw();
});