agirstatool/src/org/april/agirstatool/core/pages/issueAgeChartView.xhtml

93 lines
2.5 KiB
HTML

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Agir Statool</title>
<meta charset="UTF-8" />
<meta content="April" name="keywords" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="agirstatool.css" />
<script src="/commons/sorttable.js" />
<script src="Chart.bundle.min.js"></script>
</head>
<body>
<div style="width: 100%; height: 100%; text-align: center; margin: 0 0; border: 1px solid red;" title="Active Issues Age">
<canvas id="myChart" width="100%" height="100%"></canvas>
<script>
var ctx = document.getElementById('myChart');
var myChart = new Chart(ctx,
{
type: 'line',
data:
{
labels: ['S01', 'S02', 'S03', 'S04', 'S05'],
datasets:
[
{
label: 'min',
data: [2, 9, 13, 15, 22, 23],
backgroundColor: 'rgba(255, 99, 132, 0.2)',
borderColor: 'rgba(255, 99, 132, 1)',
borderWidth: 1,
fill: +1,
cubicInterpolationMode: 'monotone',
lineTension: 0,
pointBorderWidth: 0.00000001
},
{
label: 'mean',
data : [1, 5, 9, 13, 15, 22],
backgroundColor: 'rgba(75, 192, 192, 0.2)',
borderColor: 'rgba(75, 192, 192, 1)',
borderWidth: 1,
fill: +2,
cubicInterpolationMode: 'monotone',
lineTension: 0,
pointBorderWidth: 0.00000001
},
{
label: 'max',
data : [1, 5, 9, 13, 15, 22],
backgroundColor: 'rgba(153, 102, 255, 0.2)',
borderColor: 'rgba(153, 102, 255, 1)',
borderWidth: 1,
fill: false,
cubicInterpolationMode: 'monotone',
lineTension: 0,
pointBorderWidth: 0.00000001
}
]
},
options:
{
maintainAspectRatio: false,
title: {
display: false,
text: 'Active Issue Age'
},
scales:
{
xAxes:
[{
ticks:
{
beginAtZero: false
}
}],
yAxes:
[{
ticks:
{
beginAtZero: false,
suggestedMax: 10,
precision: 0
}
}]
}
}
});
</script>
</div>
</body>
</html>