饼状图

This commit is contained in:
huang 2016-06-14 09:57:53 +08:00
parent 9029fd91e0
commit c6bd5e6d31
3 changed files with 78 additions and 1 deletions

View File

@ -1 +1,76 @@
test <%= javascript_include_tag 'highcharts','highcharts-more' %>
<div class="project_r_h">
<h2 class="project_h2"><%= l(:label_quality_analyses) %></h2>
</div>
<div class="repository_con " style="line-height:1.9;">
<%#= render :partial => 'navigation' %>
<div class="cl"></div>
</div>
<div id = "container">
</div>
<div id = "container_quality" class="mt30">
</div>
<script>
$(function () {
$('#container').highcharts({
chart: {
type: 'pie',
options3d: {
enabled: true,
alpha: 45,
beta: 0
}
},
title: {
text: 'Browser market shares at a specific website, 2014'
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
depth: 35,
dataLabels: {
enabled: true,
format: '{point.name}'
}
}
},
series: [{
type: 'pie',
name: 'Browser share',
data: [
['Firefox', 45.0],
['IE', 26.8],
{
name: 'Chrome',
y: 12.8,
sliced: true,
selected: true
},
['Safari', 8.5],
['Opera', 6.2],
['Others', 0.7]
],
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'
}
}
}]
});
});
</script>
<p><%= link_to l(:button_back), :action => 'show', :id => @project %></p>
<% html_title(l(:label_repository), l(:label_statistics)) -%>

View File

@ -602,6 +602,7 @@ en:
label_time_tracking: Time tracking label_time_tracking: Time tracking
label_change_plural: Changes label_change_plural: Changes
label_statistics: Statistics label_statistics: Statistics
label_quality_analyses: Quality Analyses
label_commits_per_month: Commits per month label_commits_per_month: Commits per month
label_commits_per_author: Commits per author label_commits_per_author: Commits per author
label_diff: diff label_diff: diff

View File

@ -732,6 +732,7 @@ zh:
label_time_tracking: 时间跟踪 label_time_tracking: 时间跟踪
label_change_plural: 变更 label_change_plural: 变更
label_statistics: 统计 label_statistics: 统计
label_quality_analyses: 质量分析
label_commits_per_month: 每月提交次数 label_commits_per_month: 每月提交次数
label_commits_per_author: 每用户提交次数 label_commits_per_author: 每用户提交次数