|
|
|
@ -0,0 +1,57 @@
|
|
|
|
|
import "./hubei.js";
|
|
|
|
|
|
|
|
|
|
export const mapProvinceOptions = (params) => ({
|
|
|
|
|
title: {
|
|
|
|
|
text: "湖北地图",
|
|
|
|
|
subtext: "-。-"
|
|
|
|
|
},
|
|
|
|
|
tooltip: {
|
|
|
|
|
trigger: "item",
|
|
|
|
|
formatter: function (a) {
|
|
|
|
|
return a[2];
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
legend: {
|
|
|
|
|
orient: "vertical",
|
|
|
|
|
x: "right",
|
|
|
|
|
data: ["数据名称"]
|
|
|
|
|
},
|
|
|
|
|
dataRange: {
|
|
|
|
|
min: 0,
|
|
|
|
|
max: 1000,
|
|
|
|
|
color: ["orange", "yellow"],
|
|
|
|
|
text: ["高", "低"], // 文本,默认为数值文本
|
|
|
|
|
calculable: true
|
|
|
|
|
},
|
|
|
|
|
series: [
|
|
|
|
|
{
|
|
|
|
|
name: "数据名称",
|
|
|
|
|
type: "map",
|
|
|
|
|
mapType: "湖北", //改成对应省份名
|
|
|
|
|
selectedMode: "single",
|
|
|
|
|
itemStyle: {
|
|
|
|
|
normal: { label: { show: true } },
|
|
|
|
|
emphasis: { label: { show: true } }
|
|
|
|
|
},
|
|
|
|
|
//这里的data是辅助改变某个地区颜色的,如果你不需要完全可以不加
|
|
|
|
|
data: [
|
|
|
|
|
{ name: "十堰市", value: Math.round(Math.random() * 1000) },
|
|
|
|
|
{ name: "襄樊市", value: Math.round(Math.random() * 1000) },
|
|
|
|
|
{ name: "随州市", value: Math.round(Math.random() * 1000) },
|
|
|
|
|
{ name: "神农架林区", value: Math.round(Math.random() * 1000) },
|
|
|
|
|
{ name: "恩师土家族苗族自治州", value: Math.round(Math.random() * 1000) },
|
|
|
|
|
{ name: "宜昌市", value: Math.round(Math.random() * 1000) },
|
|
|
|
|
{ name: "荆门市", value: Math.round(Math.random() * 1000) },
|
|
|
|
|
{ name: "天门市", value: Math.round(Math.random() * 1000) },
|
|
|
|
|
{ name: "潜江市", value: Math.round(Math.random() * 1000) },
|
|
|
|
|
{ name: "荆州市", value: Math.round(Math.random() * 1000) },
|
|
|
|
|
{ name: "仙桃市", value: Math.round(Math.random() * 1000) },
|
|
|
|
|
{ name: "武汉市", value: Math.round(Math.random() * 1000) },
|
|
|
|
|
{ name: "黄冈市", value: Math.round(Math.random() * 1000) },
|
|
|
|
|
{ name: "鄂州市", value: Math.round(Math.random() * 1000) },
|
|
|
|
|
{ name: "咸宁市", value: Math.round(Math.random() * 1000) },
|
|
|
|
|
{ name: "黄石市", value: Math.round(Math.random() * 1000) }
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
});
|