调整积分排名的样式

This commit is contained in:
aixianling
2024-09-29 14:37:58 +08:00
parent e88658b1be
commit 2cbddaeb4a

View File

@@ -35,7 +35,8 @@ const aiTrend = {
}
const integralOrder = {
series: {
name: "c", type: "bar", barWidth: 10,
type: "bar", barWidth: 10,
encode: {x: 'integral', y: 'name'},
label: {position: [390, 0], show: true, color: "#fff"},
labelLine: hide,
showBackground: !0, backgroundStyle: {color: "rgba(107,126,148,0.4)"},
@@ -60,10 +61,11 @@ const integralOrder = {
yAxis: {
type: "category", inverse: true, axisLine: hide, axisTick: hide, axisPointer: hide,
axisLabel: {
showMaxLabel: true, align: 'left', margin:60,
color: "#9CB3C9", formatter: (name, index) => {
const icon = {
0: "🥇", 1: "🥈", 2: "🥉",
}[index] ?? `{div|${index}}`
}[index] ?? `{div|${index + 1}} `
return `${icon} ${name}`
},
rich: {
@@ -72,13 +74,13 @@ const integralOrder = {
borderColor: {type: "linear", x: 0, y: 0, x2: 0, y2: 1, colorStops: [{offset: 0, color: "#00EFFF"}, {offset: 1, color: "#00527D"}]},
color: '#fff',
borderRadius: 4,
padding: [3, 4]
padding: [2, 2, 0, 2]
}
}
}
},
xAxis: hide,
grid: {left: 20, right: 40, top: 0, bottom: 0, containLabel: true},
grid: {left: -40, right: 40, top: 0, bottom: 0, containLabel: true},
legend: hide,
tooltip: {trigger: 'axis', backgroundColor: "#33333388", textStyle: {color: '#fff'}}
}