1.3
This commit is contained in:
@ -564,7 +564,8 @@ export const GraphChart = (props: { type: string, chartData: any[], chartColor?:
|
||||
let mapData: any[] = [];
|
||||
if (type == "map") {//地图处理数据
|
||||
dataValue = dealWithData(chartData);
|
||||
mapData = dataValue.splice(0, 3);
|
||||
// mapData = dataValue.splice(0, 3);
|
||||
mapData = dataValue;
|
||||
}
|
||||
const autoTooltip = (index: number) => {
|
||||
myChart.dispatchAction({
|
||||
@ -739,7 +740,7 @@ export const GraphChart = (props: { type: string, chartData: any[], chartColor?:
|
||||
coordinateSystem: "geo",
|
||||
data: dataValue,
|
||||
symbolSize: function (val) {
|
||||
return val[2] == 0 ? 8 : Math.floor(val[2] / 12.5);
|
||||
return val[2] == 0 ? 8 : Math.floor(val[2] / 1.2);
|
||||
},
|
||||
symbol: "circle",
|
||||
// symbolSize: 8,
|
||||
@ -773,48 +774,48 @@ export const GraphChart = (props: { type: string, chartData: any[], chartColor?:
|
||||
disabled: true
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "",
|
||||
type: "effectScatter",
|
||||
coordinateSystem: "geo",
|
||||
data: mapData,
|
||||
symbolSize: 16,
|
||||
// symbolSize: function (val) {
|
||||
// return Math.floor(val[1] / 4);
|
||||
// },
|
||||
tooltip: {
|
||||
formatter(value) {
|
||||
return value.data.name + "<br/>" + "今日评标总数:" + value.data.value[2] + "<br/>" + "电子招标:" + value.data.value[3] + "<br/>" + "电子评标:" + value.data.value[4];
|
||||
},
|
||||
backgroundColor: "#0a0c11cc",
|
||||
textStyle: {
|
||||
color: '#fff'
|
||||
},
|
||||
show: true
|
||||
},
|
||||
encode: {
|
||||
value: 2
|
||||
},
|
||||
showEffectOn: "render",
|
||||
rippleEffect: {
|
||||
brushType: "stroke",
|
||||
color: "rgb(36,203,255)",
|
||||
period: 9,
|
||||
scale: 5
|
||||
},
|
||||
label: {
|
||||
formatter: "{b}",
|
||||
position: "right",
|
||||
color: "#fff",
|
||||
show: true
|
||||
},
|
||||
itemStyle: {
|
||||
color: "rgb(36,203,255)",
|
||||
shadowBlur: 2,
|
||||
shadowColor: "#333"
|
||||
},
|
||||
zlevel: 1
|
||||
}
|
||||
// {
|
||||
// name: "",
|
||||
// type: "effectScatter",
|
||||
// coordinateSystem: "geo",
|
||||
// data: mapData,
|
||||
// symbolSize: 16,
|
||||
// // symbolSize: function (val) {
|
||||
// // return Math.floor(val[1] / 4);
|
||||
// // },
|
||||
// tooltip: {
|
||||
// formatter(value) {
|
||||
// return value.data.name + "<br/>" + "今日评标总数:" + value.data.value[2] + "<br/>" + "电子招标:" + value.data.value[3] + "<br/>" + "电子评标:" + value.data.value[4];
|
||||
// },
|
||||
// backgroundColor: "#0a0c11cc",
|
||||
// textStyle: {
|
||||
// color: '#fff'
|
||||
// },
|
||||
// show: true
|
||||
// },
|
||||
// encode: {
|
||||
// value: 2
|
||||
// },
|
||||
// showEffectOn: "render",
|
||||
// rippleEffect: {
|
||||
// brushType: "stroke",
|
||||
// color: "rgb(36,203,255)",
|
||||
// period: 9,
|
||||
// scale: 5
|
||||
// },
|
||||
// label: {
|
||||
// formatter: "{b}",
|
||||
// position: "right",
|
||||
// color: "#fff",
|
||||
// show: true
|
||||
// },
|
||||
// itemStyle: {
|
||||
// color: "rgb(36,203,255)",
|
||||
// shadowBlur: 2,
|
||||
// shadowColor: "#333"
|
||||
// },
|
||||
// zlevel: 1
|
||||
// }
|
||||
]
|
||||
};
|
||||
const gaugeOption: EChartsOption = {
|
||||
@ -1237,16 +1238,16 @@ export const GraphChart = (props: { type: string, chartData: any[], chartColor?:
|
||||
myChart && myChart.resize();
|
||||
};
|
||||
let interval: any = null;
|
||||
if (type == "map") {//地图自动轮播tooltip
|
||||
let index = 0;
|
||||
interval = setInterval(() => {
|
||||
autoTooltip(index)
|
||||
index++;
|
||||
if (index >= mapData.length) {
|
||||
index = 0;
|
||||
}
|
||||
}, 10000)
|
||||
}
|
||||
// if (type == "map") {//地图自动轮播tooltip
|
||||
// let index = 0;
|
||||
// interval = setInterval(() => {
|
||||
// autoTooltip(index)
|
||||
// index++;
|
||||
// if (index >= mapData.length) {
|
||||
// index = 0;
|
||||
// }
|
||||
// }, 10000)
|
||||
// }
|
||||
window.addEventListener("resize", debounce(() => resize(), 100));
|
||||
return () => {
|
||||
window.removeEventListener("resize", debounce(() => resize(), 100));
|
||||
|
Reference in New Issue
Block a user