版本库统计与动态统一

This commit is contained in:
huang 2016-04-15 16:01:25 +08:00
parent a21200ab14
commit a18daeecd1
1 changed files with 89 additions and 17 deletions

View File

@ -14,6 +14,7 @@
</div>
<div id = "container_code" class="mt30">
</div>
<script>
$(function () {
$('#container_code').highcharts({
@ -21,7 +22,11 @@
type: 'line'
},
title: {
text: '代码提交量'
text: '版本库代码提交行数',
style:{
fontSize: '14px'
}
},
subtitle: {
// text: 'Source: WorldClimate.com'
@ -45,6 +50,12 @@
}
},
plotOptions: {
series: {
marker: {
radius: 3, //曲线点半径默认是4
symbol: 'circle' //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
}
},
line: {
dataLabels: {
enabled: true
@ -52,18 +63,55 @@
enableMouseTracking: false
}
},
series: [{
name: '改动或增加',
// data: [7.0, 6.9, 9.5, 14.5, 18.4, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
data: <%= @static_total_per_user.map{|c| c.add.to_i} %>
},
{
name: '删除',
data: <%= @static_total_per_user.map{|c| c.del.to_i} %>
},{
name: '总变更',
data: <%= @static_total_per_user.map{|c| c.changes.to_i} %>
series: [
{
name: '<b style="font-weight:normal ">总变更</b>',
color: '#d05d5a',
fontWeight: 'normal',
data: <%= @static_total_per_user.map{|c| c.changes.to_i} %>,
dataLabels: {
enabled: true,
style: {
fontSize: '13px',
color: '#aaa',
fontFamily: 'Arial',
textShadow: '0px 0px 6px rgb(0, 0, 0), 0px 0px 3px rgb(f, f, f)',
fontWeight: 'normal'
}
},
lineWidth: 1.5
},
{
name: '<b style="font-weight:normal ">改动或增加</b>',
color: '#5b6b76',
data: <%= @static_total_per_user.map{|c| c.add.to_i} %>,
dataLabels: {
enabled: true,
style: {
fontSize: '13px',
color: '#aaa',
fontFamily: 'Arial',
textShadow: '0px 0px 6px rgb(0, 0, 0), 0px 0px 3px rgb(f, f, f)',
fontWeight: 'normal'
}
},
lineWidth: 1.5
},
{
name: '<b style="font-weight:normal ">删除</b>',
color: '#84b5bb',
data: <%= @static_total_per_user.map{|c| c.del.to_i} %>,
dataLabels: {
enabled: true,
style: {
fontSize: '13px',
color: '#aaa',
fontFamily: 'Arial',
textShadow: '0px 0px 6px rgb(0, 0, 0), 0px 0px 3px rgb(f, f, f)',
fontWeight: 'normal'
}
},
lineWidth: 1.5
}]
});
@ -76,14 +124,18 @@
enabled: false
},
title: {
text: '代码提交次数'
text: '版本库代码提交次数',
style:{
fontSize: '14px'
}
},
subtitle: {
// text: 'Source: WorldClimate.com'
},
xAxis: {
// categories: ["Jan", "Jan", "Jan", 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
categories: <%= raw(@static_total_per_user.map{|c| c.uname}) %>
categories: <%= raw(@static_total_per_user.map{|c| c.uname}) %>
},
yAxis: {
title: {
@ -97,6 +149,12 @@
}
},
plotOptions: {
series: {
marker: {
radius: 3, //曲线点半径默认是4
symbol: 'circle' //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
}
},
line: {
dataLabels: {
enabled: true
@ -105,9 +163,23 @@
}
},
series: [{
name: '提交次数',
name: '<b style="font-weight:normal ">提交次数</b>',
fontWeight: 'normal',
color: '#d05d5a',
// data: [7.0, 6.9, 9.5, 14.5, 18.4, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
data: <%= @static_total_per_user.map{|c| c.commits_num.to_i} %>
data: <%= @static_total_per_user.map{|c| c.commits_num.to_i} %>,
dataLabels: {
enabled: true,
style: {
fontSize: '13px',
color: '#aaa',
fontFamily: 'Arial',
textShadow: '0px 0px 6px rgb(0, 0, 0), 0px 0px 3px rgb(f, f, f)',
fontWeight: 'normal'
}
},
lineWidth: 1.5
}
// {
// name: 'London',