184 lines
5.9 KiB
HTML
184 lines
5.9 KiB
HTML
<!--
|
|
~ Copyright (C) 2021 Anton Romanov - All Rights Reserved
|
|
~ You may use, distribute and modify this code, please write to: romanov73@gmail.com.
|
|
-->
|
|
|
|
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
|
|
<html
|
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.w3.org/1999/xhtml"
|
|
layout:decorate="~{default}">
|
|
<head>
|
|
<title>Простая обработка формы на Spring MVC</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
|
</head>
|
|
<div class="container" layout:fragment="content">
|
|
<script src="/webjars/highcharts/7.0.0/highcharts.js"></script>
|
|
<script th:inline="javascript">
|
|
$(document).ready(function () {
|
|
var chart = {
|
|
type: 'scatter',
|
|
zoomType: 'xy'
|
|
};
|
|
var title = {
|
|
text: 'Количество коммитов во времени'
|
|
};
|
|
var xAxis = {
|
|
categories: [[${datas}]],
|
|
title: {
|
|
enabled: true,
|
|
text: 'Дата'
|
|
},
|
|
startOnTick: true,
|
|
endOnTick: true,
|
|
showLastLabel: true
|
|
};
|
|
var yAxis = {
|
|
title: {
|
|
text: 'Кол-во коммитов'
|
|
}
|
|
};
|
|
var plotOptions = {
|
|
scatter: {
|
|
marker: {
|
|
radius: 5,
|
|
states: {
|
|
hover: {
|
|
enabled: true,
|
|
lineColor: 'rgb(100,100,100)'
|
|
}
|
|
}
|
|
},
|
|
states: {
|
|
hover: {
|
|
marker: {
|
|
enabled: false
|
|
}
|
|
}
|
|
},
|
|
tooltip: {
|
|
headerFormat: '<b>{series.name}</b><br>',
|
|
pointFormat: '{point.y} commits'
|
|
}
|
|
}
|
|
};
|
|
var series = [
|
|
{
|
|
name: 'Коммиты',
|
|
color: 'rgba(119,152,191,0.5)',
|
|
data: [[${commitTimeData}]]
|
|
}
|
|
];
|
|
|
|
var json = {};
|
|
json.chart = chart;
|
|
json.title = title;
|
|
json.xAxis = xAxis;
|
|
json.yAxis = yAxis;
|
|
json.series = series;
|
|
json.plotOptions = plotOptions;
|
|
$('#container').highcharts(json);
|
|
});
|
|
</script>
|
|
<script th:inline="javascript">
|
|
$(document).ready(function () {
|
|
var chart = {
|
|
plotBackgroundColor: null,
|
|
plotBorderWidth: null,
|
|
plotShadow: false
|
|
};
|
|
var title = {
|
|
text: '% коммитов авторов'
|
|
};
|
|
var tooltip = {
|
|
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
|
|
};
|
|
var plotOptions = {
|
|
pie: {
|
|
allowPointSelect: true,
|
|
cursor: 'pointer',
|
|
dataLabels: {
|
|
enabled: false
|
|
},
|
|
showInLegend: true
|
|
}
|
|
};
|
|
var series = [{
|
|
type: 'pie',
|
|
name: 'Browser share',
|
|
data: [[${commitAuthorData}]]
|
|
}];
|
|
|
|
var json = {};
|
|
json.chart = chart;
|
|
json.title = title;
|
|
json.tooltip = tooltip;
|
|
json.series = series;
|
|
json.plotOptions = plotOptions;
|
|
$('#containerPie').highcharts(json);
|
|
});
|
|
</script>
|
|
<script th:inline="javascript">
|
|
$(document).ready(function () {
|
|
var chart = {
|
|
type: 'column'
|
|
};
|
|
var title = {
|
|
text: 'Количество коммитов'
|
|
};
|
|
var xAxis = {
|
|
categories: [[${urls}]],
|
|
crosshair: true,
|
|
title: {
|
|
text: 'Url'
|
|
}
|
|
};
|
|
var yAxis = {
|
|
min: 0,
|
|
title: {
|
|
text: 'Кол-во'
|
|
}
|
|
};
|
|
var tooltip = {
|
|
headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
|
|
pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
|
|
'<td style="padding:0"><b>{point.y:.1f} mm</b></td></tr>',
|
|
footerFormat: '</table>',
|
|
shared: true,
|
|
useHTML: true
|
|
};
|
|
var plotOptions = {
|
|
column: {
|
|
pointPadding: 0.2,
|
|
borderWidth: 0
|
|
}
|
|
};
|
|
var credits = {
|
|
enabled: false
|
|
};
|
|
|
|
var series = [{
|
|
name: 'Коммиты',
|
|
data: [[${commitUrlData}]]
|
|
}];
|
|
|
|
var json = {};
|
|
json.chart = chart;
|
|
json.title = title;
|
|
json.tooltip = tooltip;
|
|
json.xAxis = xAxis;
|
|
json.yAxis = yAxis;
|
|
json.series = series;
|
|
json.plotOptions = plotOptions;
|
|
json.credits = credits;
|
|
$('#containerColumn').highcharts(json);
|
|
|
|
});
|
|
</script>
|
|
<div class="row">
|
|
<div id="container" style="width: 550px; height: 400px; margin: 0 auto"></div>
|
|
<div id="containerPie" style="width: 550px; height: 400px; margin: 0 auto"></div>
|
|
<div id="containerColumn" style="width: 550px; height: 400px; margin: 0 auto"></div>
|
|
</div>
|
|
</div>
|
|
</html>
|