每日概况

master
chenxiaojun 5 years ago
parent 7ca07fb23d
commit dc01638699

@ -294,8 +294,15 @@
var data2 = []; var data2 = [];
var dataName1 = ''; var dataName1 = '';
var dataName2 = ''; var dataName2 = '';
var xLabelInterval = 0;
var sdate = Date.parse($('#sdate').val()) / 1000;
var edate = Date.parse($('#edate').val()) / 1000;
var chartBox = echarts.init(document.getElementById('chart_box')); var chartBox = echarts.init(document.getElementById('chart_box'));
if ((edate - sdate) > 1555200) {
xLabelInterval = 1;
}
switch (dataType) { switch (dataType) {
case 1: case 1:
data1 = roleNum; data1 = roleNum;
@ -338,7 +345,7 @@
top: "13%", top: "13%",
containLabel: true containLabel: true
}, },
color: ["#72b332", '#35a9e0'], color: ["#b32106", '#143f53'],
legend: { legend: {
data: [dataName1, dataName2], data: [dataName1, dataName2],
show: true, show: true,
@ -377,7 +384,7 @@
color: "#808080" color: "#808080"
}, },
alignWithLabel: true, alignWithLabel: true,
interval: 1, interval: xLabelInterval,
}, },
axisLine: { axisLine: {
lineStyle: { lineStyle: {
@ -416,14 +423,12 @@
name: dataName1, name: dataName1,
type: 'line', type: 'line',
smooth: true, smooth: true,
symbol: 'circle',
data: data1 data: data1
}, },
{ {
name: dataName2, name: dataName2,
type: 'line', type: 'line',
smooth: true, smooth: true,
symbol: 'circle',
data: data2 data: data2
} }
], ],

Loading…
Cancel
Save