|
2 | 2 | {% block content %}
|
3 | 3 |
|
4 | 4 | <!-- jQuery -->
|
5 |
| - <script src="https://code.jquery.com/jquery.js"></script> |
| 5 | + <link rel="stylesheet" href="http://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> |
| 6 | + <script src="https://code.jquery.com/jquery-1.12.4.js"></script> |
| 7 | + <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> |
| 8 | + |
| 9 | + <script> |
| 10 | + $( function() { |
| 11 | + $( "#datepicker" ).datepicker(); |
| 12 | + $( "#anim" ).on( "change", function() { |
| 13 | + $( "#datepicker" ).datepicker( "option", "showAnim", $( this ).val() ); |
| 14 | + }); |
| 15 | + } ); |
| 16 | + </script> |
| 17 | + |
6 | 18 |
|
7 | 19 | <!-- Google Charts API -->
|
8 | 20 | <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
|
9 | 21 |
|
10 |
| -<!-- /.col-lg-4 --> |
11 |
| -<div class="col-lg-4"> |
12 |
| - <div class="panel panel-default"> |
13 |
| - <div class="panel-heading"> |
14 |
| - Donut Chart Example |
15 |
| - </div> |
16 |
| - <!-- /.panel-heading --> |
17 |
| - <div class="panel-body"> |
18 |
| - <div id="morris-donut-chart"></div> |
19 |
| - |
20 |
| - <script type="text/javascript"> |
21 |
| - $(function() { |
22 |
| - |
23 |
| - // Donut Chart |
24 |
| - Morris.Donut({ |
25 |
| - element: 'morris-donut-chart', |
26 |
| - data: [ |
27 |
| - {% for call in prod_calls %} |
28 |
| - { |
29 |
| - label: "{{ call['call_name'] }}", |
30 |
| - value: {{ call['percent_volume'] }} |
31 |
| - }, |
32 |
| - {% endfor %} |
33 |
| - ], |
34 |
| - resize: true |
| 22 | +<div class="row"> |
| 23 | + <!-- /.col-lg-4 --> |
| 24 | + <div class="col-lg-4"> |
| 25 | + <div class="panel panel-default"> |
| 26 | + <div class="panel-heading"> |
| 27 | + API Calls by Volume (morris) |
| 28 | + </div> |
| 29 | + <!-- /.panel-heading --> |
| 30 | + <div class="panel-body"> |
| 31 | + <p>Date: <input type="text" id="datepicker" size="30"></p> |
| 32 | + <div id="morris-donut-prod"></div> |
| 33 | + <script type="text/javascript"> |
| 34 | + $(function() { |
| 35 | + |
| 36 | + // Donut Chart |
| 37 | + Morris.Donut({ |
| 38 | + element: 'morris-donut-prod', |
| 39 | + data: [ |
| 40 | + {% for call in prod_calls %} |
| 41 | + { |
| 42 | + label: "{{ call['call_name'] }}", |
| 43 | + value: {{ call['percent_volume'] }} |
| 44 | + }, |
| 45 | + {% endfor %} |
| 46 | + ], |
| 47 | + resize: true |
| 48 | + }); |
35 | 49 | });
|
36 |
| - }); |
37 |
| - </script> |
38 |
| - </div> |
39 |
| - <!-- /.panel-body --> |
40 |
| - </div> |
41 |
| - <!-- /.panel --> |
| 50 | + </script> |
| 51 | + </div> |
| 52 | + <!-- /.panel-body --> |
| 53 | + </div> |
| 54 | + <!-- /.panel --> |
| 55 | + </div> |
42 | 56 | </div>
|
43 | 57 |
|
44 |
| - |
45 | 58 | <h1>API Calls by Volume</h1>
|
46 | 59 |
|
47 | 60 | <!-- Identify where the chart should be drawn. -->
|
|
0 commit comments