Welcome to mirror list, hosted at ThFree Co, Russian Federation.

languages.html.haml « graphs « projects « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6d97f552a8e83f28b64b6fd1c806405d2ece3c48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
- @no_container = true
- page_title "Languages", "Graphs"
= render 'head'

%div{ class: (container_class) }
  .sub-header-block
    .oneline
      Programming languages used in this repository

  .row
    .col-md-8
      %canvas#languages-chart{ height: 400 }
    .col-md-4
      %ul.bordered-list
        - @languages.each do |language|
          %li
            %span{ style: "color: #{language[:color]}" }
              = icon('circle')
             
            = language[:label]
            .pull-right
              = language[:value]
              \%

:javascript
  var data = #{@languages.to_json};
  var ctx = $("#languages-chart").get(0).getContext("2d");
  var options = {
    scaleOverlay: true,
    responsive: true,
    maintainAspectRatio: false
  }
  var myPieChart = new Chart(ctx).Pie(data, options);