diff --git a/src/assets/images/Sponge_screen/menu/DB_img.png b/src/assets/images/Sponge_screen/menu/DB_img.png index e1e2474..dba624c 100644 --- a/src/assets/images/Sponge_screen/menu/DB_img.png +++ b/src/assets/images/Sponge_screen/menu/DB_img.png Binary files differ diff --git a/src/assets/images/Sponge_screen/menu/DB_img.png b/src/assets/images/Sponge_screen/menu/DB_img.png index e1e2474..dba624c 100644 --- a/src/assets/images/Sponge_screen/menu/DB_img.png +++ b/src/assets/images/Sponge_screen/menu/DB_img.png Binary files differ diff --git a/src/views/oneMap/components/ZHHM.vue b/src/views/oneMap/components/ZHHM.vue index e728beb..1ea7288 100644 --- a/src/views/oneMap/components/ZHHM.vue +++ b/src/views/oneMap/components/ZHHM.vue @@ -707,38 +707,26 @@ AllData.Charts4.dispose(); } AllData.Charts4 = echarts.init(document.getElementById("CSPLBZTS")); + var Data = {}; + Data.yAxis = [141.49, 33, 14, 33, 39]; + var barTopColor = ["#fe7285FF", "#1f93ffFF", "#31e1adFF", "#e4cd61FF", "#12f9ffFF"]; + var barBottomColor = [ + "RGBA(154, 102, 125, 0.6)", + "RGBA(17, 109, 182, 0.6)", + "RGBA(27, 152, 136, 0.6)", + "RGBA(126, 138, 92, 0.6)", + "RGBA(10, 162, 178, 0.6)", + ]; + var barWidth = 20; AllData.Charts4.setOption({ tooltip: { trigger: "axis", - axisPointer: { - type: "shadow", - }, - }, - tooltip: { - trigger: "axis", - formatter: (params) => { - // console.log(params); - var relVal = "" + params[0].name; - for (var i = 0, l = params.length; i < l; i++) { - if (params[i].seriesName) { - let unit = params[i].seriesName == "年降雨量" ? "mm" : "天"; - relVal += - "
" + - params[i].marker + - params[i].seriesName + - " " + - params[i].value + - unit; - } - } - return relVal; - }, }, grid: { left: "3%", right: "4%", bottom: "3%", - top: "10%", + top: 30, containLabel: true, }, xAxis: { @@ -751,83 +739,125 @@ }, }, }, - yAxis: { - type: "value", - axisLabel: { - formatter: "{value}Km", - }, - axisPointer: { - type: "shadow", - }, - axisLine: { - lineStyle: { - color: "aqua", - type: "dashed", + yAxis: [ + { + name: "长度(Km)", + type: "value", + axisLabel: { + color: "#ffffff", + show: true, }, - }, - splitLine: { - lineStyle: { - // 使用深浅的间隔色 - color: ["#184E5A"], + nameTextStyle: { + color: "#ffffff", }, + splitLine: { + lineStyle: { + type: "dashed", + color: "#ffffff", + }, + }, + alignTicks: true, }, - }, + ], series: [ { - type: "bar", - showBackground: true, - barWidth: "12px", + name: "数量", + type: "pictorialBar", + symbolSize: [barWidth, 10], + symbolOffset: [0, -6], + symbolPosition: "end", + z: 12, itemStyle: { - borderRadius: [10, 10, 0, 0], //(顺时针左上,右上,右下,左下) + normal: { + color: function (params) { + return barTopColor[params.dataIndex]; + }, + }, }, - backgroundStyle: { - // color: "red", - shadowBlur: 10, - borderRadius: [10, 10, 0, 0], //(顺时针左上,右上,右下,左下) - }, - data: [ - { - value: 499.04, - itemStyle: { - color: "#FE7285", - shadowColor: "#FE7285", - borderType: "dashed", - }, - }, - { - value: 33, - itemStyle: { - color: "#1F93FF", - shadowColor: "#1F93FF", - borderType: "dashed", - }, - }, - { - value: 14, - itemStyle: { - color: "#31E1AD", - shadowColor: "#31E1AD", - borderType: "dashed", - }, - }, - { - value: 33, - itemStyle: { - color: "#E4CD61", - shadowColor: "#E4CD61", - borderType: "dashed", - }, - }, - { - value: 39, - itemStyle: { - color: "#12F9FF", - shadowColor: "#12F9FF", - borderType: "dashed", - }, - }, - ], + data: Data.yAxis, }, + { + name: "", + type: "pictorialBar", + symbolSize: [barWidth + 10, 15], + symbolOffset: [0, 8], + z: 10, + itemStyle: { + normal: { + color: "transparent", + borderColor: barTopColor, + borderType: "solid", + borderWidth: 10, + }, + }, + data: Data.yAxis, + }, + { + name: "", + type: "pictorialBar", + symbolSize: [barWidth + 20, 20], + symbolOffset: [0, 12], + z: 12, + itemStyle: { + normal: { + color: "transparent", + borderColor: barTopColor, + borderType: "solid", + borderWidth: 10, + }, + }, + data: Data.yAxis, + stack: "check", + }, + { + name: "", + type: "pictorialBar", + symbolSize: [barWidth + 25, 20], + symbolOffset: [0, 12], + z: 12, + itemStyle: { + normal: { + color: "transparent", + borderColor: "#3ACDC5", + borderType: "solid", + borderWidth: 10, + }, + }, + data: Data.yAxis, + stack: "check", + }, + { + name: "", + type: "bar", + barWidth: barWidth, + barGap: "10%", // Make series be overlap + barCateGoryGap: "10%", + itemStyle: { + normal: { + color: function (params) { + return new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { + offset: 1, + color: barTopColor[params.dataIndex], + }, + { + offset: 0, + color: barBottomColor[params.dataIndex], + }, + ]); + }, + opacity: 0.8, + }, + }, + data: Data.yAxis, + }, + // { + // // smooth: true, //变为曲线 默认false折线 + // name: "个数", + // type: "line", + // data: props.data.yAxis2, + // color: "#FFF21C", + // }, ], }); AllData.Charts4.on("click", (param) => {