statoolinfosweb/src/fr/devinsy/statoolinfos/htmlize/charts/pieChartView.xhtml

42 lines
1.2 KiB
HTML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>StatoolInfos</title>
<meta charset="UTF-8" />
<meta name="keywords" content="statoolinfos,devinsy,federation" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="statoolinfos.css" />
<script src="sorttable.js"></script>
<script src="Chart.bundle.min.js"></script>
<link rel="stylesheet" type="text/css" href="datatables.min.css"/>
<script type="text/javascript" src="datatables.min.js"></script>
</head>
<body>
<canvas id="myChart" width="100%" height="100%"></canvas>
<script>
var ctx = document.getElementById('myChart');
var myChart = new Chart(ctx,
{
type: 'pie',
data: {
datasets:
[{
data: [ 10,40,50 ],
backgroundColor: [window.chartColors.red,window.chartColors.orange,window.chartColors.yellow,window.chartColors.green,window.chartColors.blue]
}],
labels: ['Red', 'Orange', 'Yellow', 'Green', 'Blue']
},
options:
{
maintainAspectRatio: false,
display: true,
responsive: true,
legend: { display: true, position: 'right' },
title: { display: true, position: 'top', text: 'a title' },
}
});
</script>
</body>
</html>