<div id="container"></div>
html, body, #container {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
anychart.onDocumentReady(function () {
// set data and create a pie chart
var chart = anychart.pie([
["Ash Trees", 138],
["Elms", 521],
["Maples", 1395],
["Oaks", 857],
["Pines", 1966],
]);
// get statistical data (the sum of all the values)
numberOfTrees = chart.getStat("sum");
// set the title of the chart
chart.title("There Are " + numberOfTrees + " Trees in the Forest");
// set the container id for the chart
chart.container("container");
// initiate drawing the chart
chart.draw();
});