| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572 |
- //日常统计
- var myChart = echarts.init(document.getElementById('echartsrcxj'), 'walden')
- option = {
- // title: {
- // text: '动态数据',
- // },
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- label: {
- backgroundColor: 'rgba(62, 99, 151, 1)'
- }
- }
- },
- legend: {
- data: ['巡查数量', '巡查覆盖率']
- },
- xAxis: [
- {
- type: 'category',
- boundaryGap: true,
- data: (function() {
- var now = new Date()
- var res = []
- var len = 8
- while (len--) {
- res.unshift(now.getDate())
- now = new Date(now - 86400000)
- }
- return res
- })()
- },
- {
- type: 'category',
- boundaryGap: true,
- data: (function() {
- var res = []
- var len = 0
- while (len--) {
- res.push(8 - len - 1)
- }
- return res
- })()
- }
- ],
- yAxis: [
- {
- type: 'value',
- scale: true,
- name: '单位',
- max: 30,
- min: 0,
- boundaryGap: [0.2, 0.2]
- },
- {
- type: 'value',
- scale: true,
- name: '单位',
- max: 10,
- min: 0,
- boundaryGap: [0.2, 0.2]
- }
- ],
- series: [
- {
- name: '巡查覆盖率',
- type: 'bar',
- xAxisIndex: 1,
- yAxisIndex: 1,
- data: (function() {
- var res = []
- var len = 8
- while (len--) {
- res.push(Math.round(Math.random() * 10))
- }
- return res
- })()
- },
- {
- name: '巡查数量',
- type: 'line',
- data: (function() {
- var res = []
- var len = 0
- while (len < 8) {
- res.push((Math.random() * 10 + 5).toFixed(1) - 0)
- len++
- }
- return res
- })()
- }
- ]
- }
- myChart.setOption(option)
- //联动报警
- var myChart1 = echarts.init(document.getElementById('echartsldbj'), 'walden')
- option1 = {
- xAxis: {
- type: 'category',
- boundaryGap: false,
- data: (function() {
- var now = new Date()
- var res = []
- var len = 8
- while (len--) {
- res.unshift(now.getDate())
- now = new Date(now - 86400000)
- }
- return res
- })()
- },
- yAxis: {
- type: 'value'
- },
- series: [
- {
- data: [45, 60, 42, 56, 30, 42, 56, 30],
- type: 'line',
- areaStyle: {}
- }
- ]
- }
- myChart1.setOption(option1)
- var myChart2 = echarts.init(document.getElementById('echartsjgbj'), 'walden')
- option2 = {
- xAxis: {
- type: 'category',
- boundaryGap: false,
- data: (function() {
- var now = new Date()
- var res = []
- var len = 7
- while (len--) {
- res.unshift(now.getDate())
- now = new Date(now - 86400000)
- }
- return res
- })()
- },
- yAxis: {
- type: 'value'
- },
- series: [
- {
- data: [55, 32, 77, 85, 23, 59, 88],
- type: 'line',
- areaStyle: {}
- }
- ]
- }
- myChart2.setOption(option2)
- //消防给水系统
- var myChart3 = echarts.init(document.getElementById('echartsxfjs'), 'walden')
- option3 = {
- xAxis: {
- type: 'category',
- data: ['压力异常', '未启泵', '水泵手动']
- },
- yAxis: {
- type: 'value'
- },
- series: [
- {
- data: [20, 90, 60],
- type: 'bar'
- }
- ]
- }
- // 使用刚指定的配置项和数据显示图表。
- myChart3.setOption(option3)
- //故障统计
- var myChart4 = echarts.init(document.getElementById('echartsgztj'), 'walden')
- option4 = {
- // title: {
- // text: '动态数据',
- // },
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- label: {
- backgroundColor: 'rgba(62, 99, 151, 1)'
- }
- }
- },
- legend: {
- data: ['故障数量', '故障处理及时率']
- },
- xAxis: [
- {
- type: 'category',
- boundaryGap: true,
- data: (function() {
- var now = new Date()
- var res = []
- var len = 8
- while (len--) {
- res.unshift(now.getDate())
- now = new Date(now - 86400000)
- }
- return res
- })()
- },
- {
- type: 'category',
- boundaryGap: true,
- data: (function() {
- var res = []
- var len = 0
- while (len--) {
- res.push(8 - len - 1)
- }
- return res
- })()
- }
- ],
- yAxis: [
- {
- type: 'value',
- scale: true,
- name: '数量',
- max: 30,
- min: 0,
- boundaryGap: [0.2, 0.2]
- },
- {
- type: 'value',
- scale: true,
- name: '%',
- max: 100,
- min: 0,
- boundaryGap: [0.2, 0.2]
- }
- ],
- series: [
- {
- name: '故障数量',
- type: 'bar',
- xAxisIndex: 1,
- yAxisIndex: 1,
- data: (function() {
- var res = []
- var len = 8
- while (len--) {
- res.push(Math.round(Math.random() * 100))
- }
- return res
- })()
- },
- {
- name: '故障处理及时率',
- type: 'line',
- data: (function() {
- var res = []
- var len = 0
- while (len < 8) {
- res.push((Math.random() * 10 + 5).toFixed(1) - 0)
- len++
- }
- return res
- })()
- }
- ]
- }
- // 使用刚指定的配置项和数据显示图表。
- myChart4.setOption(option4)
- //火警统计
- var myChart5 = echarts.init(document.getElementById('echartshjtj'), 'walden')
- var colors = ['#5793f3', '#d14a61', '#675bba']
- option5 = {
- color: colors,
- tooltip: {
- trigger: 'none',
- axisPointer: {
- type: 'cross'
- }
- },
- legend: {
- data: ['火警数量', '火警处理及时率']
- },
- grid: {
- top: 50,
- bottom: 50
- },
- xAxis: [
- {
- type: 'category',
- axisTick: {
- alignWithLabel: true
- },
- axisLine: {
- onZero: false,
- lineStyle: {
- color: colors[1]
- }
- },
- axisPointer: {
- label: {
- formatter: function(params) {
- return (
- '火警数量 ' +
- params.value +
- (params.seriesData.length ? ':' + params.seriesData[0].data : '')
- )
- }
- }
- },
- data: (function() {
- var now = new Date()
- var res = []
- var len = 8
- while (len--) {
- res.unshift(now.getDate())
- now = new Date(now - 86400000)
- }
- return res
- })()
- },
- {
- type: 'category',
- axisTick: {
- alignWithLabel: true
- },
- axisPointer: {
- label: {
- formatter: function(params) {
- return (
- '火警处理及时率 ' +
- params.value +
- (params.seriesData.length ? ':' + params.seriesData[0].data : '')
- )
- }
- }
- }
- }
- ],
- yAxis: [
- {
- type: 'value',
- max: 90,
- min: 0
- }
- ],
- series: [
- {
- name: '火警数量',
- type: 'line',
- xAxisIndex: 1,
- smooth: true,
- data: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 9.6, 52.2, 48.7, 18.8, 6.0, 2.3]
- },
- {
- name: '火警处理及时率',
- type: 'line',
- smooth: true,
- data: [
- 3.9,
- 5.9,
- 11.1,
- 18.7,
- 48.3,
- 69.2,
- 31.6,
- 46.6,
- 55.4,
- 18.4,
- 10.3,
- 0.7
- ]
- }
- ]
- }
- myChart5.setOption(option5)
- //执法结果统计
- var myChart6 = echarts.init(document.getElementById('echartszfjgtj'), 'roma')
- option6 = {
- color: ['#3398DB'],
- tooltip : {
- trigger: 'axis',
- axisPointer : { // 坐标轴指示器,坐标轴触发有效
- type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- }
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis : [
- {
- type : 'category',
- data : ['责令立即', '责令整改', '受案登记', '行政处罚', '临时查封'],
- axisTick: {
- alignWithLabel: true
- }
- }
- ],
- yAxis : [
- {
- type : 'value'
- }
- ],
- series : [
- {
- type:'bar',
- barWidth: '60%',
- data:[10, 41, 30, 48, 20]
- }
- ]
- };
- // 使用刚指定的配置项和数据显示图表。
- myChart6.setOption(option6)
- //安全评分
- var myChart7 = echarts.init(document.getElementById('echartAqpf'))
- option7 = {
- title: {
- text: '95',
- x: 'center',
- y: 'center',
- textStyle: {
- fontWeight: 'normal',
- color: '#ffffff',
- fontSize: '30'
- }
- },
- color: ['rgba(176, 212, 251, 1)'],
-
-
- series: [{
- name: 'Line 1',
- type: 'pie',
- clockWise: true,
- radius: ['100%', '85%'],
- itemStyle: {
- normal: {
- label: {
- show: false
- },
- labelLine: {
- show: false
- }
- }
- },
- hoverAnimation: false,
- data: [{
- value: 90,
- name: '01',
- itemStyle: {
- normal: {
- color: { // 完成的圆环的颜色
- colorStops: [{
- offset: 0,
- color: '#00cefc' // 0% 处的颜色
- }, {
- offset: 1,
- color: '#367bec' // 100% 处的颜色
- }]
- },
- label: {
- show: false
- },
- labelLine: {
- show: false
- }
- }
- }
- }, {
- name: '02',
- value: 10
- }]
- }]
- }
- // 使用刚指定的配置项和数据显示图表。
- myChart7.setOption(option7)
- //维保统计
- var myChart8 = echarts.init(document.getElementById('echartWbtj'))
- option8 = {
- title: {
- text: '8%',
- x: 'center',
- y: 'center',
- textStyle: {
- fontWeight: 'normal',
- color: '#FFFFFF',
- fontSize: '30'
- }
- },
- color: ['rgba(176, 212, 251, 0.5)'],
-
-
- series: [{
- name: 'Line 1',
- type: 'pie',
- clockWise: true,
- radius: ['90%', '75%'],
- itemStyle: {
- normal: {
- label: {
- show: false
- },
- labelLine: {
- show: false
- }
- }
- },
- hoverAnimation: false,
- data: [{
- value: 8,
- name: '01',
- itemStyle: {
- normal: {
- color: { // 完成的圆环的颜色
- colorStops: [{
- offset: 0,
- color: '#00cefc' // 0% 处的颜色
- }, {
- offset: 1,
- color: '#367bec' // 100% 处的颜色
- }]
- },
- label: {
- show: false
- },
- labelLine: {
- show: false
- }
- }
- }
- }, {
- name: '02',
- value: 92
- }]
- }]
- }
- // 使用刚指定的配置项和数据显示图表。
- myChart8.setOption(option8)
|