版本库统计与动态统一

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>
<div id = "container_code" class="mt30"> <div id = "container_code" class="mt30">
</div> </div>
<script> <script>
$(function () { $(function () {
$('#container_code').highcharts({ $('#container_code').highcharts({
@ -21,7 +22,11 @@
type: 'line' type: 'line'
}, },
title: { title: {
text: '代码提交量' text: '版本库代码提交行数',
style:{
fontSize: '14px'
}
}, },
subtitle: { subtitle: {
// text: 'Source: WorldClimate.com' // text: 'Source: WorldClimate.com'
@ -45,6 +50,12 @@
} }
}, },
plotOptions: { plotOptions: {
series: {
marker: {
radius: 3, //曲线点半径默认是4
symbol: 'circle' //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
}
},
line: { line: {
dataLabels: { dataLabels: {
enabled: true enabled: true
@ -52,18 +63,55 @@
enableMouseTracking: false enableMouseTracking: false
} }
}, },
series: [{ series: [
name: '改动或增加', {
name: '<b style="font-weight:normal ">总变更</b>',
// 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] color: '#d05d5a',
data: <%= @static_total_per_user.map{|c| c.add.to_i} %> 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: '删除', name: '<b style="font-weight:normal ">改动或增加</b>',
data: <%= @static_total_per_user.map{|c| c.del.to_i} %> color: '#5b6b76',
},{ data: <%= @static_total_per_user.map{|c| c.add.to_i} %>,
name: '总变更', dataLabels: {
data: <%= @static_total_per_user.map{|c| c.changes.to_i} %> 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,7 +124,11 @@
enabled: false enabled: false
}, },
title: { title: {
text: '代码提交次数' text: '版本库代码提交次数',
style:{
fontSize: '14px'
}
}, },
subtitle: { subtitle: {
// text: 'Source: WorldClimate.com' // text: 'Source: WorldClimate.com'
@ -97,6 +149,12 @@
} }
}, },
plotOptions: { plotOptions: {
series: {
marker: {
radius: 3, //曲线点半径默认是4
symbol: 'circle' //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
}
},
line: { line: {
dataLabels: { dataLabels: {
enabled: true enabled: true
@ -105,9 +163,23 @@
} }
}, },
series: [{ 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: [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', // name: 'London',