|
|
|
@ -8,7 +8,7 @@
|
|
|
|
|
* 蓝色多边形柱状图:bluePolygonHistogram(res, ids)T
|
|
|
|
|
* 多个立体柱状图:multipleThreeDimensionalCylindrical(res, ids)
|
|
|
|
|
* */
|
|
|
|
|
|
|
|
|
|
var timeout1 = ''
|
|
|
|
|
//横向柱状图
|
|
|
|
|
const horizontalBarChart = (res, ids) => {
|
|
|
|
|
|
|
|
|
@ -365,7 +365,7 @@ const threeDimensionalCylindrical = (res, ids) => {
|
|
|
|
|
axisLabel: {
|
|
|
|
|
show: true,
|
|
|
|
|
margin: 25,
|
|
|
|
|
// align: "center",
|
|
|
|
|
align: "center",
|
|
|
|
|
textStyle: {
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
color: "#A8A6AB",
|
|
|
|
@ -382,7 +382,7 @@ const threeDimensionalCylindrical = (res, ids) => {
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
interval: 3,
|
|
|
|
|
interval: 0,
|
|
|
|
|
},
|
|
|
|
|
yAxis: {
|
|
|
|
|
splitLine: {
|
|
|
|
@ -1167,8 +1167,13 @@ const bluePolygonHistogram = (res, ids) => {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//多个立体柱状图
|
|
|
|
|
const multipleThreeDimensionalCylindrical = (res, ids) => {
|
|
|
|
|
const multipleThreeDimensionalCylindrical = (res, ids, type = 1) => {
|
|
|
|
|
let mycharts = echarts.init(ids);
|
|
|
|
|
|
|
|
|
|
let xValue
|
|
|
|
|
let lineStoreAmount
|
|
|
|
|
let hullStoreAmount
|
|
|
|
|
if (type === 1) {
|
|
|
|
|
const value = []
|
|
|
|
|
res.forEach(e => {
|
|
|
|
|
if (!(value.includes(e.materialName))) {
|
|
|
|
@ -1182,9 +1187,14 @@ const multipleThreeDimensionalCylindrical = (res, ids) => {
|
|
|
|
|
hullStoreAmount: res.filter(val => val.materialName === e).filter(val => val.hullStoreAmount === 'U001')?.[0]?.lineStoreAmount || 0
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
const xValue = data.map(val => val.materialName)
|
|
|
|
|
const lineStoreAmount = data.map(val => val.lineStoreAmount)
|
|
|
|
|
const hullStoreAmount = data.map(val => val.hullStoreAmount)
|
|
|
|
|
xValue = data.map(val => val.materialName)
|
|
|
|
|
lineStoreAmount = data.map(val => val.lineStoreAmount)
|
|
|
|
|
hullStoreAmount = data.map(val => val.hullStoreAmount)
|
|
|
|
|
} else {
|
|
|
|
|
xValue = res.map(val => val.materialName)
|
|
|
|
|
lineStoreAmount = res.map(val => val.lineStoreAmount)
|
|
|
|
|
hullStoreAmount = res.map(val => val.hullStoreAmount)
|
|
|
|
|
}
|
|
|
|
|
let lineColor = "#406A92";
|
|
|
|
|
let labelColor = "#fff";
|
|
|
|
|
let fontSize = "12";
|
|
|
|
@ -1226,7 +1236,7 @@ const multipleThreeDimensionalCylindrical = (res, ids) => {
|
|
|
|
|
color: "#fff",
|
|
|
|
|
fontSize: fontSize,
|
|
|
|
|
},
|
|
|
|
|
data: ["内胆库", "箱壳库"],
|
|
|
|
|
data: ["箱壳库", "内胆库"],
|
|
|
|
|
},
|
|
|
|
|
xAxis: [
|
|
|
|
|
{
|
|
|
|
@ -1538,12 +1548,12 @@ const multipleThreeDimensionalCylindrical = (res, ids) => {
|
|
|
|
|
option.grid.bottom = '20%'
|
|
|
|
|
}
|
|
|
|
|
const aaa = () => {
|
|
|
|
|
setInterval(() => {
|
|
|
|
|
timeout1 && clearTimeout(timeout1)
|
|
|
|
|
timeout1 = setInterval(() => {
|
|
|
|
|
option.dataZoom[0].start += stepSize
|
|
|
|
|
option.dataZoom[0].start = option.dataZoom[0].start % 100
|
|
|
|
|
option.dataZoom[0].end = option.dataZoom[0].start + stepSize
|
|
|
|
|
mycharts.setOption(option);
|
|
|
|
|
$(window).resize(mycharts.resize);
|
|
|
|
|
}, 3000)
|
|
|
|
|
}
|
|
|
|
|
aaa()
|
|
|
|
@ -1722,7 +1732,7 @@ const inventory = (res, ids) => {
|
|
|
|
|
"rgba(2,195,241,0.1)",
|
|
|
|
|
];
|
|
|
|
|
const xAxisData = res.map(val => val.materialName?.split(',')[0])
|
|
|
|
|
const seriesData1 = res.map(val => val.lineStoreAmount)
|
|
|
|
|
const seriesData1 = res.map(val => val.lineStoreAmount != 0 ? val.lineStoreAmount : 0.00001)
|
|
|
|
|
console.log(xAxisData, seriesData1)
|
|
|
|
|
// Res.forEach((item) => {
|
|
|
|
|
// xAxisData.push(item.name);
|
|
|
|
@ -1799,6 +1809,9 @@ const inventory = (res, ids) => {
|
|
|
|
|
textStyle: {
|
|
|
|
|
color: "#02C3F1",
|
|
|
|
|
},
|
|
|
|
|
formatter: function (params) {
|
|
|
|
|
return seriesData1[params.dataIndex] === 0.00001 ? 0 : seriesData1[params.dataIndex]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
symbolPosition: "end",
|
|
|
|
|
data: seriesData1,
|
|
|
|
|