newmediamonitoring1/polls/templates/polls/monitor_result.html

56 lines
1.6 KiB
HTML

{% extends 'polls/base.html' %}
{% load static %}
{% block content%}
<div class="flex-container">
<div class="row">
<div class="col-xs-12">
<div id="chart1" style="width: 100%%;height:400px;margin:20px 10px;"></div>
</div>
</div>
</div>
{% endblock%}
{% block add_js %}
<script src="{% static 'polls/js/echarts.min.js' %}"></script>
<script type="text/javascript">
var myChart = echarts.init(document.getElementById('chart1'));
var option = {
title: {
text: '政务新媒体存在问题占比',
left: 'center',
subtextStyle: {
fontSize: 16,
}
},
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)'
},
legend: {
top: '15%',
data: ['账号不存在', '账号已关闭', '监测期间无更新', '两周无更新', '名称变更']
},
series: [
{
name: '总量',
type: 'pie',
radius: '55%',
center: ['50%', '60%'],
data: [
{name: '账号不存在', value:27},
{name: '账号已关闭', vlaue:1},
{name: '监测期间无更新', value:6},
{name: '两周无更新', value:46},
{name: '名称变更', value:25},
],
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]};
myChart.setOption(option);
</script>
{% endblock %}