2
2
{% from 'macros/macros_form.html' import form_field %}
3
3
{% from 'macros/macros_CommitTimesListByDay.html' import commitTimesListByDay %}
4
4
{% from 'macros/macros_ContributorNetworkMatrix.html' import contributorNetworkMatrix %}
5
- {% from 'macros/macros_FileContributorMatrix.html' import fileContributorMatrix%}
5
+ {% from 'macros/macros_FileContributorMatrix.html' import fileContributorMatrix %}
6
+ {% from 'macros/macros_RepoBaseInformation.html' import repoBaseInformation%}
6
7
{% block scripts %}
7
8
{{ super() }}
8
9
< script src ="{{ url_for('static', filename='js/echarts.js') }} "> </ script >
19
20
< a class ="nav-link active " id ="search-tab " data-toggle ="tab " href ="#search " role ="tab "
20
21
aria-controls ="search "
21
22
aria-selected ="false ">
22
- < h6 > 贡献网络矩阵 </ h6 >
23
+ < h6 > 仓库基本信息 </ h6 >
23
24
</ a >
24
25
</ li >
25
26
< li class ="nav-item ">
26
27
< a class ="nav-link " id ="home-tab " data-toggle ="tab " href ="#admin " role ="tab " aria-controls ="home "
27
28
aria-selected ="true ">
28
- < h6 > Commit时间分布图 </ h6 >
29
+ < h6 > 贡献演化 </ h6 >
29
30
</ a >
30
31
</ li >
31
32
< li class ="nav-item ">
32
33
< a class ="nav-link " id ="profile-tab " data-toggle ="tab " href ="#edit " role ="tab " aria-controls ="profile "
33
34
aria-selected ="false ">
34
- < h6 > 折线图 </ h6 >
35
+ < h6 > 空间分布 </ h6 >
35
36
</ a >
36
37
</ li >
37
38
< li class ="nav-item ">
38
39
< a class ="nav-link " id ="contact-tab " data-toggle ="tab " href ="#audit " role ="tab " aria-controls ="contact "
39
40
aria-selected ="false ">
40
- < h6 > 文件贡献矩阵 </ h6 >
41
+ < h6 > 协作关系 </ h6 >
41
42
</ a >
42
43
</ li >
43
44
< li class ="nav-item ">
@@ -48,157 +49,33 @@ <h6>多重柱状图</h6>
48
49
</ li >
49
50
</ ul >
50
51
< div class ="tab-content border border-top-0 " id ="myTabContent ">
52
+ < div class ="tab-pane fade show active " id ="search " role ="tabpanel " aria-labelledby ="search-tab ">
53
+ {{ repoBaseInformation(repo_base_information) }}
54
+ </ div >
51
55
< div class ="tab-pane fade " id ="admin " role ="tabpanel " aria-labelledby ="home-tab ">
52
56
<!-- 为ECharts准备一个具备大小(宽高)的Dom -->
53
57
{{ commitTimesListByDay(commit_times_list_by_day) }}
54
58
</ div >
55
59
< div class ="tab-pane fade " id ="edit " role ="tabpanel " aria-labelledby ="profile-tab ">
56
- < div id =" main2 " style =" width: 800px;height:500px;margin: 0 auto; " > </ div >
60
+ {{ fileContributorMatrix(file_contributor_matrix) }}
57
61
</ div >
58
62
< div class ="tab-pane fade " id ="audit " role ="tabpanel " aria-labelledby ="contact-tab ">
59
- {{ fileContributorMatrix(file_contributor_matrix ) }}
63
+ {{ contributorNetworkMatrix(contributor_network_matrix ) }}
60
64
</ div >
61
65
< div class ="tab-pane fade " id ="contact " role ="tabpanel " aria-labelledby ="contact-tab ">
62
66
< div id ="main4 " style ="width: 800px;height:500px;margin: 0 auto; "> </ div >
63
67
</ div >
64
- < div class ="tab-pane fade show active " id ="search " role ="tabpanel " aria-labelledby ="search-tab ">
65
- {{ contributorNetworkMatrix(contributor_network_matrix) }}
66
- </ div >
67
68
</ div >
68
69
69
70
70
71
71
72
< script type ="text/javascript ">
72
73
73
74
// 基于准备好的dom,初始化echarts实例
74
- var myChart2 = echarts . init ( document . getElementById ( 'main2' ) ) ;
75
75
var myChart4 = echarts . init ( document . getElementById ( 'main4' ) ) ;
76
76
77
77
// 指定图表的配置项和数据
78
- var option2 = {
79
- title : {
80
- text : '未来一周气温变化' ,
81
- subtext : '纯属虚构'
82
- } ,
83
- tooltip : {
84
- trigger : 'axis'
85
- } ,
86
- legend : {
87
- data : [ '最高气温' , '最低气温' ]
88
- } ,
89
- toolbox : {
90
- show : true ,
91
- feature : {
92
- mark : { show : true } ,
93
- dataView : { show : true , readOnly : false } ,
94
- magicType : { show : true , type : [ 'line' , 'bar' ] } ,
95
- restore : { show : true } ,
96
- saveAsImage : { show : true }
97
- }
98
- } ,
99
- calculable : true ,
100
- xAxis : [
101
- {
102
- type : 'category' ,
103
- boundaryGap : false ,
104
- data : [ '周一' , '周二' , '周三' , '周四' , '周五' , '周六' , '周日' ]
105
- }
106
- ] ,
107
- yAxis : [
108
- {
109
- type : 'value' ,
110
- axisLabel : {
111
- formatter : '{value} °C'
112
- }
113
- }
114
- ] ,
115
- series : [
116
- {
117
- name : '最高气温' ,
118
- type : 'line' ,
119
- data : [ 11 , 11 , 15 , 13 , 12 , 13 , 10 ] ,
120
- markPoint : {
121
- data : [
122
- { type : 'max' , name : '最大值' } ,
123
- { type : 'min' , name : '最小值' }
124
- ]
125
- } ,
126
- markLine : {
127
- data : [
128
- { type : 'average' , name : '平均值' }
129
- ]
130
- }
131
- } ,
132
- {
133
- name : '最低气温' ,
134
- type : 'line' ,
135
- data : [ 1 , - 2 , 2 , 5 , 3 , 2 , 0 ] ,
136
- markPoint : {
137
- data : [
138
- { name : '周最低' , value : - 2 , xAxis : 1 , yAxis : - 1.5 }
139
- ]
140
- } ,
141
- markLine : {
142
- data : [
143
- { type : 'average' , name : '平均值' }
144
- ]
145
- }
146
- }
147
- ]
148
- } ;
149
- var option3 = {
150
- title : {
151
- text : '某站点用户访问来源' ,
152
- subtext : '纯属虚构' ,
153
- x : 'center'
154
- } ,
155
- tooltip : {
156
- trigger : 'item' ,
157
- formatter : "{a} <br/>{b} : {c} ({d}%)"
158
- } ,
159
- legend : {
160
- orient : 'vertical' ,
161
- x : 'left' ,
162
- data : [ '直接访问' , '邮件营销' , '联盟广告' , '视频广告' , '搜索引擎' ]
163
- } ,
164
- toolbox : {
165
- show : true ,
166
- feature : {
167
- mark : { show : true } ,
168
- dataView : { show : true , readOnly : false } ,
169
- magicType : {
170
- show : true ,
171
- type : [ 'pie' , 'funnel' ] ,
172
- option : {
173
- funnel : {
174
- x : '25%' ,
175
- width : '50%' ,
176
- funnelAlign : 'left' ,
177
- max : 1548
178
- }
179
- }
180
- } ,
181
- restore : { show : true } ,
182
- saveAsImage : { show : true }
183
- }
184
- } ,
185
- calculable : true ,
186
- series : [
187
- {
188
- name : '访问来源' ,
189
- type : 'pie' ,
190
- radius : '55%' ,
191
- center : [ '50%' , '60%' ] ,
192
- data : [
193
- { value : 335 , name : '直接访问' } ,
194
- { value : 310 , name : '邮件营销' } ,
195
- { value : 234 , name : '联盟广告' } ,
196
- { value : 135 , name : '视频广告' } ,
197
- { value : 1548 , name : '搜索引擎' }
198
- ]
199
- }
200
- ]
201
- } ;
78
+
202
79
var option4 = {
203
80
tooltip : {
204
81
trigger : 'axis' ,
@@ -272,7 +149,6 @@ <h6>多重柱状图</h6>
272
149
273
150
274
151
// 使用刚指定的配置项和数据显示图表。
275
- myChart2 . setOption ( option2 ) ;
276
152
myChart4 . setOption ( option4 ) ;
277
153
</ script >
278
154
{% endblock %}
0 commit comments