Commit 1a9aa5cc authored by 李苏's avatar 李苏 💬

大屏数据

parent 3db27fa9
...@@ -2012,25 +2012,45 @@ function setTimeProductionEchart(chart,apidata) { ...@@ -2012,25 +2012,45 @@ function setTimeProductionEchart(chart,apidata) {
} }
}, },
grid: { grid: {
top:80, top:"10%",
left: 20, left: "5%",
bottom: 20, bottom: "0%",
right: 40, right: "5%",
containLabel: true, containLabel: true,
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: dateList, data: dateList,
axisLabel: { axisLabel: {
interval: 4, interval: 1,
tooltip: { tooltip: {
show: true, show: true,
}, },
inside: false, inside: false,
textStyle: { textStyle: {
fontSize: 14 fontSize: 12
}, },
color: 'rgba(255,255,255,0.6)' color: 'rgba(255,255,255,0.6)',
formatter:function(value){
var str = "";
var num = 6; //每行显示字数
var valLength = value.length; //该项x轴字数
var rowNum = Math.ceil(valLength / num); // 行数
if(rowNum > 1) {
for(var i = 0; i < rowNum; i++) {
var temp = "";
var start = i * num;
var end = start + num;
temp = value.substring(start, end) + "\n";
str += temp;
}
return str;
} else {
return value;
}
}
}, },
axisTick: { axisTick: {
show: false show: false
...@@ -2040,7 +2060,7 @@ function setTimeProductionEchart(chart,apidata) { ...@@ -2040,7 +2060,7 @@ function setTimeProductionEchart(chart,apidata) {
color: '#0C1A5B', color: '#0C1A5B',
} }
}, },
}, },
yAxis: [{ yAxis: [{
type: 'value', type: 'value',
...@@ -2130,13 +2150,17 @@ function setDailyDataEchart(chart,apidata) { ...@@ -2130,13 +2150,17 @@ function setDailyDataEchart(chart,apidata) {
} }
}, },
legend: { legend: {
align: 'left',
right:0, right:0,
orient:"vertical", // orient:"vertical",
x : 'right', //居左显示
y: 'left', //延Y轴
textStyle:{ textStyle:{
color:'white' color:'white'
} }
}, },
grid: { grid: {
top:'20%',
left: '3%', left: '3%',
right: '4%', right: '4%',
bottom: '3%', bottom: '3%',
...@@ -2264,6 +2288,13 @@ function setHglEchart(chart,apidata) { ...@@ -2264,6 +2288,13 @@ function setHglEchart(chart,apidata) {
} }
var ops= { var ops= {
color:["#409eff"], color:["#409eff"],
grid: {
top:"10%",
left: "5%",
bottom: "5%",
right: "5%",
containLabel: true,
},
xAxis: { xAxis: {
type: 'category', type: 'category',
data:datelist|| ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], data:datelist|| ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
...@@ -2384,7 +2415,7 @@ function setRpcHglEchart(chart,apidata1,apidata2) { ...@@ -2384,7 +2415,7 @@ function setRpcHglEchart(chart,apidata1,apidata2) {
}) })
} }
var ops = { var ops = {
color:["#409eff","#ffd03e"], color:["#409eff","#55ff7f","#ffd03e"],
// tooltip: { // tooltip: {
// trigger: 'axis', // trigger: 'axis',
// axisPointer: { // axisPointer: {
...@@ -2395,7 +2426,7 @@ function setRpcHglEchart(chart,apidata1,apidata2) { ...@@ -2395,7 +2426,7 @@ function setRpcHglEchart(chart,apidata1,apidata2) {
// } // }
// }, // },
legend: { legend: {
data: ['计划', '合格率'], data: ['计划', '完工','合格率'],
textStyle:{ textStyle:{
color:'white' color:'white'
} }
...@@ -2495,13 +2526,13 @@ function setRpcHglEchart(chart,apidata1,apidata2) { ...@@ -2495,13 +2526,13 @@ function setRpcHglEchart(chart,apidata1,apidata2) {
} }
], ],
series: [ series: [
{ {
name: '计划', name: '计划',
type: 'bar', type: 'bar',
data: jslist||[ data: jslist||[
2.6, 5.9, 9.0, 26.4, 28.7, 2.6, 5.9, 9.0, 26.4, 28.7,
], ],
barWidth : 30, barWidth : 15,
itemStyle:{ itemStyle:{
normal:{ normal:{
label:{ label:{
...@@ -2516,6 +2547,27 @@ function setRpcHglEchart(chart,apidata1,apidata2) { ...@@ -2516,6 +2547,27 @@ function setRpcHglEchart(chart,apidata1,apidata2) {
} }
}, },
{
name: '完工',
type: 'bar',
data: wglist||[
2.6, 5.9, 9.0, 26.4, 28.7,
],
barWidth : 15,
itemStyle:{
normal:{
label:{
show:true,
position:"top",
textStyle:{
color:"white",
}
}
}
}
},
{ {
name: '合格率', name: '合格率',
type: 'line', type: 'line',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment