|
|
@@ -180,7 +180,7 @@
|
|
|
pieHole: 0.1,
|
|
|
'chartArea': {'width': '95%', 'height': '100%'},
|
|
|
};
|
|
|
- var chart = new google.visualization.PieChart(document.getElementById('networkschart'));
|
|
|
+ var chart = new google.visualization.PieChart(document.getElementById('channelschart'));
|
|
|
chart.draw(data, options);
|
|
|
}
|
|
|
</script>
|
|
|
@@ -195,9 +195,90 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="content">
|
|
|
- <div id="networkschart"></div>
|
|
|
+ <div id="channelschart"></div>
|
|
|
</div>
|
|
|
</section>
|
|
|
+ {% if isxpspent > 1 %}
|
|
|
+ <script type="text/javascript">
|
|
|
+ google.charts.load("current", {packages:["corechart"]});
|
|
|
+ google.charts.setOnLoadCallback(drawChart2);
|
|
|
+ function drawChart2() {
|
|
|
+ var data = google.visualization.arrayToDataTable([
|
|
|
+ ['Network', 'XP spent'],
|
|
|
+ {% for network in networkslist.items %}
|
|
|
+ ['{{ network.0|escapejs }}', {{ network.1.xpspentcount }}],
|
|
|
+ {% endfor %}
|
|
|
+ ]);
|
|
|
+ var options = {
|
|
|
+ legend: 'none',
|
|
|
+ pieSliceText: 'label',
|
|
|
+ height: '275',
|
|
|
+ pieHole: 0.1,
|
|
|
+ 'chartArea': {'width': '95%', 'height': '100%'},
|
|
|
+ sliceVisibilityThreshold: 0,
|
|
|
+ };
|
|
|
+ var chart = new google.visualization.PieChart(document.getElementById('xpspentchart'));
|
|
|
+ chart.draw(data, options);
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+ <section class="ui card">
|
|
|
+ <div class="content" title="XP spent per network">
|
|
|
+ <div class="header">
|
|
|
+ <div>
|
|
|
+ <i class="ui dashboard icon"></i>
|
|
|
+ /
|
|
|
+ <i class="ui sitemap icon"></i>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="content">
|
|
|
+ <div id="xpspentchart"></div>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+ <script type="text/javascript">
|
|
|
+ google.charts.load("current", {packages:["corechart"]});
|
|
|
+ google.charts.setOnLoadCallback(drawChart3);
|
|
|
+ function drawChart3() {
|
|
|
+ var data = google.visualization.arrayToDataTable([
|
|
|
+ ['Coin spent', 'Coin given'],
|
|
|
+ {% for network in networkslist.items %}
|
|
|
+ ['{{ network.0|escapejs }}', {{ network.1.xpspentcount }}],
|
|
|
+ {% endfor %}
|
|
|
+ ]);
|
|
|
+ var options = {
|
|
|
+ legend: 'none',
|
|
|
+ pieSliceText: 'label',
|
|
|
+ height: '275',
|
|
|
+ pieHole: 0.1,
|
|
|
+ 'chartArea': {'width': '95%', 'height': '100%'},
|
|
|
+ pieSliceText: 'label',
|
|
|
+ sliceVisibilityThreshold: 0,
|
|
|
+ };
|
|
|
+ var chart = new google.visualization.PieChart(document.getElementById('spentvsgivenchart'));
|
|
|
+ chart.draw(data, options);
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+ <section class="ui card">
|
|
|
+ <div title="Coin spent vs given" class="content">
|
|
|
+ <div class="header">
|
|
|
+ <div>
|
|
|
+ <i class="icons">
|
|
|
+ <i class="ui cart icon"></i>
|
|
|
+ <i class="top right corner money icon"></i>
|
|
|
+ </i>
|
|
|
+ /
|
|
|
+ <i class="icons">
|
|
|
+ <i class="ui send icon"></i>
|
|
|
+ <i class="left top corner money icon"></i>
|
|
|
+ </i>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="content">
|
|
|
+ <div id="spentvsgivenchart"></div>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+ {% endif %}
|
|
|
</article>
|
|
|
</div>
|
|
|
{% endblock content %}
|