This commit is contained in:
unknown 2023-12-05 16:31:56 +08:00
parent dbd7475e3f
commit 0c642b288c
26 changed files with 42419 additions and 49 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -988,7 +988,9 @@ export default {
color: "#D8C74A",
},
},
data: [],
data: [
],
},
{
tooltip: {
@ -1208,30 +1210,30 @@ export default {
};
// series
const series = [
{
z: 2,
name: "底部",
type: "pictorialBar",
data: [1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1,1,1,1],
symbol: "diamond",
symbolOffset: [0, "50%"],
symbolSize: [18, 12],
itemStyle: {
color: {
type: "linear",
x: 0,
x2: 1,
y: 0,
y2: 0,
colorStops: [
{ offset: 0, color: "rgba(27, 126, 242, 1)" },
{ offset: 0.5, color: "rgba(27, 126, 242, 1)" },
{ offset: 0.5, color: "rgba(27, 126, 242, .7)" },
{ offset: 1, color: "rgba(27, 126, 242, 1)" },
],
},
},
},
// {
// z: 2,
// name: "",
// type: "pictorialBar",
// data: [1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1,1,1,1],
// symbol: "diamond",
// symbolOffset: [0, "50%"],
// symbolSize: [18, 12],
// itemStyle: {
// color: {
// type: "linear",
// x: 0,
// x2: 1,
// y: 0,
// y2: 0,
// colorStops: [
// { offset: 0, color: "rgba(27, 126, 242, 1)" },
// { offset: 0.5, color: "rgba(27, 126, 242, 1)" },
// { offset: 0.5, color: "rgba(27, 126, 242, .7)" },
// { offset: 1, color: "rgba(27, 126, 242, 1)" },
// ],
// },
// },
// },
{
z: 3,
name: "上部1",
@ -1240,7 +1242,7 @@ export default {
data: dataArr.disinfeced,
symbol: "diamond",
symbolOffset: [0, "-50%"],
symbolSize: ["0.09rem", "0.06rem"],
symbolSize: [18, 12],
label: {
normal: {
show: true,
@ -1255,13 +1257,13 @@ export default {
},
itemStyle: {
borderColor: "#28F1FA",
borderWidth: 2,
borderWidth: 4,
color: "#28F1FA",
},
},
{
z: 1,
stack: "总量",
stack: "",
type: "bar",
name: "电费",
barWidth: 18,

View File

@ -1395,7 +1395,6 @@ export default {
let src = require("../assets/shandong.json");
function registerMap() {
echarts.registerMap("山东", src);
//json
var mapFeatures = echarts.getMap("山东").geoJson.features;
var geoCoordMap = {};
@ -1440,9 +1439,9 @@ export default {
zlevel: 3,
rippleEffect: {
//
period: 4, //
period: 3, //
brushType: "fill", // stroke, fill
scale: 10, //
scale: 5, //
},
symbol: "circle",
symbolSize: 7,

View File

@ -1137,12 +1137,69 @@ export default {
window.addEventListener("resize", function () {
myChart.resize();
});
//
//
let src = require("../assets/shandong.json");
function registerMap() {
echarts.registerMap("山东", src);
//json
var mapFeatures = echarts.getMap("山东").geoJson.features;
var geoCoordMap = {};
//
mapFeatures.forEach(function (v) {
//
var name = v.properties.name;
//
geoCoordMap[name] = v.properties.center;
});
//value
var convertData = function (data) {
var res = [];
for (var i = 0; i < data.length; i++) {
var geoCoord = geoCoordMap[data[i].name];
if (geoCoord) {
res.push({
name: data[i].name,
value: geoCoord.concat(data[i].value),
});
}
}
return res;
};
let option = {
// 使2D
geo: {
// 2D
show: false, // 2D
map: "山东",
roam: false, //
layoutCenter: ["50%", "50%"], //
layoutSize: "155%", //
aspectScale: 0.9, //
zlevel: 1,
},
series: [
//
{
type: "effectScatter",
coordinateSystem: "geo",
zlevel: 3,
rippleEffect: {
//
period: 3, //
brushType: "fill", // stroke, fill
scale: 5, //
},
symbol: "circle",
symbolSize: 7,
itemStyle: {
normal: {
show: true,
color: "#D8C74A",
},
},
data: [],
},
{
tooltip: {
trigger: "item",
@ -1160,12 +1217,13 @@ export default {
borderWidth: 2, //
},
label: {
fontSize: "0.0625rem", //
fontSize: "0.06rem", //
color: "#fff",
},
},
label: {
show: true, //
zlevel: 4,
formatter: function (params) {
var name = params.name;
var value = params.value;
@ -1174,24 +1232,25 @@ export default {
},
textStyle: {
color: "#000", //
fontSize: "0.0833rem", //
fontSize: "0.08rem", //
fontFamily: "微软雅黑",
// backgroundColor: {
// image: "../assets//.png",
// image: require("../assets//.png"),
// },
// padding: [15, 20],
// backgroundSize: "10px 10px",
// backgroundPosition: "top left",
},
rich: {
fline: {
padding: [0, 35],
color: "#FDCC00",
fontSize: "0.0729rem",
fontSize: "0.07rem",
fontWeight: 600,
},
tline: {
padding: [0, 27],
color: "#fff",
fontSize: "0.0625rem",
fontSize: "0.06rem",
},
},
},
@ -1241,6 +1300,8 @@ export default {
animation: true,
};
option.series[0].data = convertData(data); //
myChart.setOption(option);
myChart.on("click", chartClick);
//

View File

@ -1174,12 +1174,69 @@ export default {
window.addEventListener("resize", function () {
myChart.resize();
});
//
//
let src = require("../assets/shandong.json");
function registerMap() {
echarts.registerMap("山东", src);
//json
var mapFeatures = echarts.getMap("山东").geoJson.features;
var geoCoordMap = {};
//
mapFeatures.forEach(function (v) {
//
var name = v.properties.name;
//
geoCoordMap[name] = v.properties.center;
});
//value
var convertData = function (data) {
var res = [];
for (var i = 0; i < data.length; i++) {
var geoCoord = geoCoordMap[data[i].name];
if (geoCoord) {
res.push({
name: data[i].name,
value: geoCoord.concat(data[i].value),
});
}
}
return res;
};
let option = {
// 使2D
geo: {
// 2D
show: false, // 2D
map: "山东",
roam: false, //
layoutCenter: ["50%", "50%"], //
layoutSize: "155%", //
aspectScale: 0.9, //
zlevel: 1,
},
series: [
//
{
type: "effectScatter",
coordinateSystem: "geo",
zlevel: 3,
rippleEffect: {
//
period: 3, //
brushType: "fill", // stroke, fill
scale: 5, //
},
symbol: "circle",
symbolSize: 7,
itemStyle: {
normal: {
show: true,
color: "#D8C74A",
},
},
data: [],
},
{
tooltip: {
trigger: "item",
@ -1197,13 +1254,13 @@ export default {
borderWidth: 2, //
},
label: {
// fontSize: 12, //
fontSize: "0.0625rem", //
fontSize: "0.06rem", //
color: "#fff",
},
},
label: {
show: true, //
zlevel: 4,
formatter: function (params) {
var name = params.name;
var value = params.value;
@ -1212,27 +1269,25 @@ export default {
},
textStyle: {
color: "#000", //
// fontSize: 16, //
fontSize: "0.0833rem", //
fontSize: "0.08rem", //
fontFamily: "微软雅黑",
// backgroundColor: {
// image: "../assets//.png",
// image: require("../assets//.png"),
// },
// padding: [15, 20],
// backgroundSize: "10px 10px",
// backgroundPosition: "top left",
},
rich: {
fline: {
padding: [0, 35],
color: "#FDCC00",
// fontSize: 14,
fontSize: "0.0729rem",
fontSize: "0.07rem",
fontWeight: 600,
},
tline: {
padding: [0, 27],
color: "#fff",
// fontSize: 12,
fontSize: "0.0625rem",
fontSize: "0.06rem",
},
},
},
@ -1282,6 +1337,8 @@ export default {
animation: true,
};
option.series[0].data = convertData(data); //
myChart.setOption(option);
myChart.on("click", chartClick);
//