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

109 lines
2.9 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:
{
datasets:
[
{
label: 'min',
backgroundColor: 'rgba(255, 99, 132, 0.2)',
borderColor: 'rgba(255, 99, 132, 1)',
borderWidth: 1,
fill: +1,
cubicInterpolationMode: 'monotone',
lineTension: 0,
pointBorderWidth: 0.00000001,
data: [2, 9, 13, 15, 22, 23],
},
{
label: 'mean',
backgroundColor: 'rgba(75, 192, 192, 0.2)',
borderColor: 'rgba(75, 192, 192, 1)',
borderWidth: 1,
fill: +2,
cubicInterpolationMode: 'monotone',
lineTension: 0,
pointBorderWidth: 0.00000001,
data : [1, 5, 9, 13, 15, 22],
},
{
label: 'max',
backgroundColor: 'rgba(153, 102, 255, 0.2)',
borderColor: 'rgba(153, 102, 255, 1)',
borderWidth: 1,
fill: false,
cubicInterpolationMode: 'monotone',
lineTension: 0,
pointBorderWidth: 0.00000001,
data : [1, 5, 9, 13, 15, 22],
}
]
},
options:
{
maintainAspectRatio: false,
title: {
display: false,
text: 'Active Issue Age'
},
scales:
{
xAxes:
[{
type: 'time',
time:
{
unit: 'month',
isoWeekday: true,
displayFormats:
{
month: 'YYYY MMM'
}
},
distribution: 'linear',
ticks:
{
beginAtZero: false,
maxTicksLimit: 0
},
gridLines:
{
zeroLineColor: 'rgba(0, 0, 0, 0.1)',
offsetGridLines: false
}
}],
yAxes:
[{
ticks:
{
beginAtZero: false,
suggestedMax: 10,
precision: 0
}
}]
}
}
});
</script>
</div>
</body>
</html>