调整完毕

This commit is contained in:
aixianling
2024-04-18 19:17:17 +08:00
parent f3e1580fef
commit a20fcb413a
6 changed files with 188 additions and 170 deletions

View File

@@ -1,7 +1,9 @@
import pie from "./template/pie"
import line from "./template/line";
import bar from "./template/bar";
import graph from "./template/graph";
export default {
...bar, ...line, ...pie
...bar, ...line, ...pie, ...graph
}

View File

@@ -0,0 +1,31 @@
import tools from "./tools";
const color = ["#18FEFE", "#1890FF"]
export const graphChart1 = {
grid: {
left: 50, right: 0
},
xAxis: {show: false},
yAxis: {show: false},
tooltip: {},
color,
daemon: {
type: 'graph',
layout: 'force',
label: {
show: true, position: 'inside',
}, symbol: 'circle', dataRender: (row, i) => ({
...row,
symbolSize: Math.max(4, 256 * parseFloat(row.纠纷占比) / 100),
value: row.纠纷占比,
itemStyle: {
borderColor: color[i % 2],
borderWidth: 1,
color: tools.$colorUtils.Hex2RGBA(color[i % 2], .5),
}
}),
}
}
export default {
graphChart1
}

View File

@@ -1,7 +1,7 @@
import tools from "./tools";
export const lineChart1 = {
legend: { show: false },
legend: {show: false},
grid: {
left: 50,
right: 0
@@ -10,17 +10,18 @@ export const lineChart1 = {
trigger: 'axis',
backgroundColor: 'rgba(14, 51, 111, 0.9)',
borderColor: '#1A6ABC',
textStyle: { color: '#fff' },
axisPointer: { type: 'cross' }
textStyle: {color: '#fff'},
axisPointer: {type: 'cross'}
},
yAxis: {
nameGap: 23,
minInterval: 1,
splitLine: { lineStyle: { color: 'rgba(255,255,255,.2)', type: 'dashed' } },
axisLabel: { color: '#fff' },
axisPointer: { snap: true }
splitLine: {lineStyle: {color: 'rgba(255,255,255,.2)', type: 'dashed'}},
axisLabel: {color: '#fff'},
axisPointer: {snap: true}
},
daemon: (color) => ({
type: "line",
showSymbol: false,
smooth: true,
lineStyle: {
@@ -36,8 +37,8 @@ export const lineChart1 = {
y: 0,
y2: 1,
colorStops: [
{ offset: 0, color: tools.$colorUtils.Hex2RGBA(color, 0.3) },
{ offset: 1, color: tools.$colorUtils.Hex2RGBA(color, 0.1) }
{offset: 0, color: tools.$colorUtils.Hex2RGBA(color, 0.3)},
{offset: 1, color: tools.$colorUtils.Hex2RGBA(color, 0.1)}
]
}
}
@@ -56,6 +57,7 @@ export const lineChart2 = {
textStyle: {color: '#fff'}
},
daemon: color => ({
type: "line",
showSymbol: false,
lineStyle: {shadowBlur: 4, shadowOffsetY: 2},
areaStyle: {
@@ -81,6 +83,7 @@ export const lineChart3 = {
textStyle: {color: '#fff'}
},
daemon: {
type: "line",
smooth: true,
lineStyle: {
shadowBlur: 1,
@@ -102,13 +105,14 @@ export const lineChart4 = {
textStyle: {color: '#fff'}
},
daemon: {
type: "line",
lineStyle: {shadowBlur: 4, shadowOffsetY: 2},
emphasis: {
focus: 'self'
}
}
};
export const lineChart5 = {
export const lineChart5 = {
legend: {show: false},
grid: {
left: 50, right: 0, top: 10, bottom: 30
@@ -125,6 +129,7 @@ export const lineChart5 = {
axisPointer: {snap: true}
},
daemon: color => ({
type: "line",
showSymbol: false, smooth: true,
lineStyle: {shadowBlur: 4, shadowOffsetY: 2},
areaStyle: {
@@ -145,4 +150,4 @@ export default {
lineChart3,
lineChart4,
lineChart5,
}
}

View File

@@ -63,7 +63,7 @@ export default {
const json = JSON.parse(res.param)
if (type == "530300000000") {
this.geoData = json.map
this.$refs.map.chart?.setOption({series: {data: this.mapData}})
this.$refs.map?.chart?.setOption({series: {data: this.mapData}})
}
this.config.summaryConfigs = json.sta?.map((e, i) => ({pos: ["rt", "lb", 'lt', 'rb'][i % 4], display: "summary20", ...e})) || []
})