Chart / dataset /web /AnyChart /pie /chart_0043_pie.html
Pekku's picture
Upload folder using huggingface_hub
79dc9c8 verified
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta content="width=device-width, initial-scale=1" name="viewport">
<title>BCT Pie Chart 07</title>
<link href="https://playground.anychart.com/docs/samples/BCT_Pie_Chart_07/iframe" rel="canonical">
<meta content="Circle Chart,Graphics,Pie Chart" name="keywords">
<meta content="AnyChart - JavaScript Charts designed to be embedded and integrated" name="description">
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<link href="_deps/cdn.anychart.com/releases/8.14.1/css/anychart-ui.min_qe95e7e741b.css" rel="stylesheet" type="text/css">
<style>html, body, #container {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}</style>
</head>
<body>
<div id="container"></div>
<script src="_deps/cdn.anychart.com/releases/8.14.1/js/anychart-base.min_qe95e7e741b.js"></script>
<script src="_deps/cdn.anychart.com/releases/8.14.1/js/anychart-exports.min_qe95e7e741b.js"></script>
<script src="_deps/cdn.anychart.com/releases/8.14.1/js/anychart-ui.min_qe95e7e741b.js"></script>
<script type="text/javascript">anychart.onDocumentReady(function () {
// create a stage
var stage = anychart.graphics.create("container");
// create data
var data = [
{x: "A", value: 637166},
{x: "B", value: 721630},
{x: "C", value: 148662},
{x: "D", value: 78662},
{x: "E", value: 90000}
];
// create and configure the first pie chart
var pie1 = anychart.pie(data);
pie1.title("Descending Order");
pie1.bounds(0, 0, "33.3%", "100%");
// set the sorting mode
pie1.sort("desc");
// disable the legend
pie1.legend(false);
// set the chart container
pie1.container(stage);
// initiate drawing the chart
pie1.draw();
// create and configure second pie chart
var pie2 = anychart.pie(data);
pie2.title("Ascending Order");
pie2.bounds("33.3%", 0, "33.3%", "100%");
// set the sorting mode
pie2.sort("asc");
// disable the legend
pie2.legend(false);
// set the chart container
pie2.container(stage);
// initiate drawing the chart
pie2.draw();
// create and configure the third pie chart
var pie3 = anychart.pie(data);
pie3.title("No Sorting");
pie3.bounds("66.6%", 0, "33.3%", "100%");
// set the sorting mode
pie3.sort("none");
// disable the legend
pie3.legend(false);
// set the chart container
pie3.container(stage);
// initiate drawing the chart
pie3.draw();
});</script>
</body>
</html>