|
|
@ -55,7 +55,6 @@ const horizontalBarChart = (res, ids) => {
|
|
|
|
let values = [];
|
|
|
|
let values = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function dataFormat(data) {
|
|
|
|
function dataFormat(data) {
|
|
|
|
let arr = [];
|
|
|
|
let arr = [];
|
|
|
|
data.forEach(function (item, i) {
|
|
|
|
data.forEach(function (item, i) {
|
|
|
@ -174,10 +173,9 @@ const horizontalBarChart = (res, ids) => {
|
|
|
|
fontSize: 12,
|
|
|
|
fontSize: 12,
|
|
|
|
color: "#A8A6AB",
|
|
|
|
color: "#A8A6AB",
|
|
|
|
textBorderWidth: 2,
|
|
|
|
textBorderWidth: 2,
|
|
|
|
position:'insideTopLeft',
|
|
|
|
position: 'insideTopLeft',
|
|
|
|
padding: [-20, 0, 0, 0],
|
|
|
|
padding: [-20, 0, 0, 0],
|
|
|
|
formatter:function (params) {
|
|
|
|
formatter: function (params) {
|
|
|
|
console.log(dataFormat(xValue)[params[`dataIndex`]])
|
|
|
|
|
|
|
|
return dataFormat(xValue)[params[`dataIndex`]].value
|
|
|
|
return dataFormat(xValue)[params[`dataIndex`]].value
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -566,7 +564,6 @@ const threeDimensionalCylindrical = (res, ids) => {
|
|
|
|
//多个折线面积图
|
|
|
|
//多个折线面积图
|
|
|
|
const multipleBrokenLineAreaDiagram = (res, ids) => {
|
|
|
|
const multipleBrokenLineAreaDiagram = (res, ids) => {
|
|
|
|
let mycharts = echarts.init(ids);
|
|
|
|
let mycharts = echarts.init(ids);
|
|
|
|
console.log(res);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let option = {
|
|
|
|
let option = {
|
|
|
|
tooltip: {
|
|
|
|
tooltip: {
|
|
|
@ -1172,15 +1169,15 @@ const bluePolygonHistogram = (res, ids) => {
|
|
|
|
//多个立体柱状图
|
|
|
|
//多个立体柱状图
|
|
|
|
const multipleThreeDimensionalCylindrical = (res, ids) => {
|
|
|
|
const multipleThreeDimensionalCylindrical = (res, ids) => {
|
|
|
|
let mycharts = echarts.init(ids);
|
|
|
|
let mycharts = echarts.init(ids);
|
|
|
|
const xValue = res.map(val => val.materialName)
|
|
|
|
const xValue = res.map(val => val.materialName?.split(',')[0] || ' ')
|
|
|
|
const lineStoreAmount = res.map(val => val.lineStoreAmount)
|
|
|
|
const lineStoreAmount = res.map(val => val.lineStoreAmount) || []
|
|
|
|
const hullStoreAmount = res.map(val => val.hullStoreAmount)
|
|
|
|
const hullStoreAmount = res.map(val => val.hullStoreAmount || '0')
|
|
|
|
let lineColor = "#406A92";
|
|
|
|
let lineColor = "#406A92";
|
|
|
|
let labelColor = "#fff";
|
|
|
|
let labelColor = "#fff";
|
|
|
|
let fontSize = "12";
|
|
|
|
let fontSize = "12";
|
|
|
|
let lineWidth = 1;
|
|
|
|
let lineWidth = 1;
|
|
|
|
let isDataZoom = xValue.length > 3
|
|
|
|
let isDataZoom = xValue.length > 3
|
|
|
|
let stepSize = 20
|
|
|
|
let stepSize = 1 / (xValue.length / 3) * 100
|
|
|
|
// hullStoreAmount.forEach((val, index) => {
|
|
|
|
// hullStoreAmount.forEach((val, index) => {
|
|
|
|
// if (val == 0) {
|
|
|
|
// if (val == 0) {
|
|
|
|
// hullStoreAmount[index] = 0
|
|
|
|
// hullStoreAmount[index] = 0
|
|
|
@ -1228,6 +1225,7 @@ const multipleThreeDimensionalCylindrical = (res, ids) => {
|
|
|
|
lineHeight: 20,
|
|
|
|
lineHeight: 20,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
axisLabel: {
|
|
|
|
axisLabel: {
|
|
|
|
|
|
|
|
interval:0,
|
|
|
|
color: labelColor,
|
|
|
|
color: labelColor,
|
|
|
|
fontSize: fontSize,
|
|
|
|
fontSize: fontSize,
|
|
|
|
margin: 30,
|
|
|
|
margin: 30,
|
|
|
@ -1519,7 +1517,7 @@ const multipleThreeDimensionalCylindrical = (res, ids) => {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
if (isDataZoom) {
|
|
|
|
if (isDataZoom) {
|
|
|
|
option.dataZoom.push({
|
|
|
|
option.dataZoom.push({
|
|
|
|
show:false,
|
|
|
|
show: false,
|
|
|
|
type: 'slider',
|
|
|
|
type: 'slider',
|
|
|
|
start: 0,
|
|
|
|
start: 0,
|
|
|
|
end: stepSize,
|
|
|
|
end: stepSize,
|
|
|
@ -1710,8 +1708,9 @@ const inventory = (res, ids) => {
|
|
|
|
let barBottomColor = [
|
|
|
|
let barBottomColor = [
|
|
|
|
"rgba(2,195,241,0.1)",
|
|
|
|
"rgba(2,195,241,0.1)",
|
|
|
|
];
|
|
|
|
];
|
|
|
|
const xAxisData = res.map(val => val.materialName)
|
|
|
|
const xAxisData = res.map(val => val.materialName?.split(',')[0] )
|
|
|
|
const seriesData1 = res.map(val => val.lineStoreAmount)
|
|
|
|
const seriesData1 = res.map(val => val.lineStoreAmount)
|
|
|
|
|
|
|
|
console.log(xAxisData,seriesData1)
|
|
|
|
// Res.forEach((item) => {
|
|
|
|
// Res.forEach((item) => {
|
|
|
|
// xAxisData.push(item.name);
|
|
|
|
// xAxisData.push(item.name);
|
|
|
|
// seriesData1.push(item.value);
|
|
|
|
// seriesData1.push(item.value);
|
|
|
@ -2378,8 +2377,8 @@ const energyConsumption = (res, ids) => {
|
|
|
|
return value + ' °C';
|
|
|
|
return value + ' °C';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
lineStyle:{
|
|
|
|
lineStyle: {
|
|
|
|
color:'#45b685'
|
|
|
|
color: '#45b685'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data: yAxisDataTwo,
|
|
|
|
data: yAxisDataTwo,
|
|
|
|
},
|
|
|
|
},
|
|
|
|