|
|
@ -1,3 +1,8 @@
|
|
|
|
|
|
|
|
<!--
|
|
|
|
|
|
|
|
~ 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">
|
|
|
|
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
|
|
|
|
<html
|
|
|
|
<html
|
|
|
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.w3.org/1999/xhtml"
|
|
|
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.w3.org/1999/xhtml"
|
|
|
@ -8,33 +13,20 @@
|
|
|
|
</head>
|
|
|
|
</head>
|
|
|
|
<div class="container" layout:fragment="content">
|
|
|
|
<div class="container" layout:fragment="content">
|
|
|
|
<script src="https://www.google.com/jsapi"></script>
|
|
|
|
<script src="https://www.google.com/jsapi"></script>
|
|
|
|
<script type="text/javascript" >
|
|
|
|
|
|
|
|
var items = [];
|
|
|
|
|
|
|
|
/*[# th:each="n : ${items}"]*/
|
|
|
|
|
|
|
|
items.push("[(${n})]");
|
|
|
|
|
|
|
|
/*[/]*/
|
|
|
|
|
|
|
|
console.log(items);
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script th:inline="javascript">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var username = [[${array}]];
|
|
|
|
|
|
|
|
console.log(username);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script th:inline="javascript">
|
|
|
|
<script th:inline="javascript">
|
|
|
|
google.load("visualization", "1", {packages: ["corechart"]});
|
|
|
|
google.load("visualization", "1", {packages: ["corechart"]});
|
|
|
|
google.setOnLoadCallback(drawChart);
|
|
|
|
google.setOnLoadCallback(drawChart);
|
|
|
|
|
|
|
|
|
|
|
|
function drawChart() {
|
|
|
|
function drawChart() {
|
|
|
|
var arr = [[${commitAuthorData}]];
|
|
|
|
var onlyCommitData = [[${commitAuthorData}]];
|
|
|
|
var newArray = [
|
|
|
|
var commitAuthorData = [
|
|
|
|
['Author','Commit']
|
|
|
|
['Автор','% коммитов']
|
|
|
|
].concat(arr);
|
|
|
|
].concat(onlyCommitData);
|
|
|
|
var data = google.visualization.arrayToDataTable(newArray);
|
|
|
|
var data = google.visualization.arrayToDataTable(commitAuthorData);
|
|
|
|
var options = {
|
|
|
|
var options = {
|
|
|
|
title: 'Состав воздуха',
|
|
|
|
title: '% коммитов авторов',
|
|
|
|
is3D: true,
|
|
|
|
is3D: true,
|
|
|
|
pieResidueSliceLabel: 'Остальное'
|
|
|
|
pieResidueSliceLabel: 'Остальные'
|
|
|
|
};
|
|
|
|
};
|
|
|
|
var chart = new google.visualization.PieChart(document.getElementById('air'));
|
|
|
|
var chart = new google.visualization.PieChart(document.getElementById('air'));
|
|
|
|
chart.draw(data, options);
|
|
|
|
chart.draw(data, options);
|
|
|
|