summaryrefslogtreecommitdiff
path: root/Project-Unite/Views/Developer/index.cshtml
blob: f371d3248bb099483ba6cb9c785ca77fc950a87c (plain) (blame)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@{
    ViewBag.Title = "Dev Control Panel";
    var db = new Project_Unite.Models.ApplicationDbContext();
    int fixedbugs = db.Bugs.Where(x => x.Open == false).Count();
    int notfixedbugs = db.Bugs.Where(x => x.Open == true).Count();

}

<h2>Welcome!</h2>

<p>Here, have a bunch of charts that tell you what you already know!</p>

<div class="row">
    <div class="col-lg-6">
        <h3>Bugs</h3>
        <p>Here's a pie chart that tells you how many bugs have been fixed.</p>
        <div id="c_bugs"></div>
    </div>
</div>

<style>
    #c_bugs{
        width:100%;
        height:900px;
    }
</style>

<!-- Resources -->
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
<script src="https://www.amcharts.com/lib/3/pie.js"></script>
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>

<!-- Chart code -->
<script>
var chart = AmCharts.makeChart( "c_bugs", {
  "type": "pie",
  "theme": "dark",
  "dataProvider": [{
    "status": "Fixed",
    "amount": @fixedbugs
  }, {
    "status": "Needs attention",
    "amount": @notfixedbugs
  }],
  "valueField": "amount",
  "titleField": "status",
   "balloon":{
   "fixedPosition":true
  },
  "export": {
    "enabled": false
  }
} );
</script>