图表调整 map车辆的点击legend的显示有问题 所以不显示marker

This commit is contained in:
lnljyang
2026-02-02 13:36:23 +08:00
parent daa9749c96
commit a19ef010f9
8 changed files with 447 additions and 134 deletions

View File

@@ -323,13 +323,22 @@ export default {
inRange: {
// 渐变颜色,从小到大(绿色系)
color: [
"#a7f3d0",
"#6ee7b7",
"#34d399",
"#10b981",
"#059669",
"#047857",
"#E2F8F2",
"#7BC69B",
"#08703D",
"#005E34",
"#036437",
"#10B981",
],
// "#FEFEFE",
// "#F4FDFA",
// "#E2F8F2",
// "#BCE9D8",
// "#7BC69B",
// "#3C9864",
// "#08703D",
// "#005F35",
// "#005E34",
},
textStyle: {
color: "#333333",
@@ -402,26 +411,10 @@ export default {
},
},
itemStyle: {
borderColor: "rgba(147, 235, 248, .8)",
borderWidth: 1,
areaColor: {
type: "radial",
x: 0.5,
y: 0.5,
r: 0.8,
colorStops: [
{
offset: 0,
color: "rgba(147, 235, 248, 0)", // 0% 处的颜色
},
{
offset: 1,
color: "rgba(147, 235, 248, .2)", // 100% 处的颜色
},
],
globalCoord: false, // 缺为 false
},
shadowColor: "rgba(128, 217, 248, .3)",
borderColor: "#475569", //地图边缘颜色
borderWidth: 0.5,
areaColor: "#ffffff",
shadowColor: "rgba(0, 0, 0, .1)",
shadowOffsetX: -2,
shadowOffsetY: 2,
shadowBlur: 10,
@@ -429,15 +422,19 @@ export default {
},
{
data: data2,
type: "scatter",
coordinateSystem: "geo",
// symbol:
// "image://https://lnh2etest.oss-cn-shanghai.aliyuncs.com/truck25.png",
// symbolSize: function (val) {
// return 20;
// // return val[2] / 50;
// },
geoIndex: 1,
symbol:
"image://https://lnh2etest.oss-cn-shanghai.aliyuncs.com/truck25.png",
symbolSize: function (val) {
return 20;
// return val[2] / 50;
},
itemStyle: {
borderColor: "#46AEF4",
borderWidth: 2
},
legendHoverLink: true,
showEffectOn: "render",
rippleEffect: {
@@ -539,13 +536,21 @@ export default {
inRange: {
// 渐变颜色,从小到大(绿色系)
color: [
"#a7f3d0",
"#6ee7b7",
"#34d399",
"#10b981",
"#059669",
"#047857",
"#E2F8F2",
"#7BC69B",
"#08703D",
"#005E34",
"#036437",
"#10B981",
],
// color: [
// "#a7f3d0",
// "#6ee7b7",
// "#34d399",
// "#10b981",
// "#059669",
// "#047857",
// ],
},
textStyle: {
color: "#333333",
@@ -618,26 +623,10 @@ export default {
},
},
itemStyle: {
borderColor: "rgba(147, 235, 248, .8)",
borderWidth: 1,
areaColor: {
type: "radial",
x: 0.5,
y: 0.5,
r: 0.8,
colorStops: [
{
offset: 0,
color: "rgba(147, 235, 248, 0)", // 0% 处的颜色
},
{
offset: 1,
color: "rgba(147, 235, 248, .2)", // 100% 处的颜色
},
],
globalCoord: false, // 缺为 false
},
shadowColor: "rgba(128, 217, 248, .3)",
borderColor: "#475569",
borderWidth: 0.5,
areaColor: "#ffffff",
shadowColor: "rgba(0, 0, 0, .1)",
shadowOffsetX: -2,
shadowOffsetY: 2,
shadowBlur: 10,
@@ -645,6 +634,7 @@ export default {
},
{
data: data2,
geoIndex: 1,
// type: "effectScatter",
// coordinateSystem: "geo",
// symbolSize: function (val) {
@@ -653,12 +643,18 @@ export default {
// },
type: "scatter",
coordinateSystem: "geo",
symbol:
"image://https://lnh2etest.oss-cn-shanghai.aliyuncs.com/station25.png",
symbolSize: function (val) {
return 20;
// return val[2] / 50;
symbolSize: 8,
itemStyle: {
color: "#FF6B6B",
borderColor: "#46AEF4",
borderWidth: 2
},
// symbol:
// "image://https://lnh2etest.oss-cn-shanghai.aliyuncs.com/station25.png",
// symbolSize: function (val) {
// return 20;
// // return val[2] / 50;
// },
legendHoverLink: true,
showEffectOn: "render",
rippleEffect: {
@@ -712,7 +708,7 @@ export default {
textShadowBlur: 10,
textBorderWidth: 0,
color: "#333333",
show: true,
show: false,
},
// colorBy: "data",
// itemStyle: {