多彩柱状完成

This commit is contained in:
aixianling
2024-03-25 18:49:22 +08:00
parent 5273f300ea
commit 03cd857bf3
6 changed files with 63 additions and 5 deletions

View File

@@ -258,6 +258,43 @@ export const barChart9 = {
backgroundStyle: {color: 'rgba(123, 165, 255, .2)'}
}
}
export const barChart10 = {
yAxis: {
nameGap: 23,
minInterval: 1,
splitLine: {lineStyle: {color: 'rgba(255,255,255,.2)', type: 'dashed'}},
axisLabel: {color: '#C3C4C4'},
axisPointer: {show: false}
},
axisPointer: {
type: 'shadow',
triggerTooltip: false,
shadowStyle: {color: 'rgba(46, 153, 255, .2)'}
},
daemon: {
type: 'bar',
barWidth: 20,
barCategoryGap: 40,
itemStyle: {
borderRadius: 20,
color(params) {
console.log(params)
const color = ['#DBB36E', '#2C97E8', '#00EFFF', '#BFEAFF'][params.dataIndex]
return {
type: 'linear',
x: 0,
x2: 0,
y: 0,
y2: 1,
colorStops: [
{offset: 0, color},
{offset: 1, color: tools.$colorUtils.Hex2RGBA(color, .1)}
]
}
}
}
}
}
export default {
barChart1,
@@ -267,4 +304,5 @@ export default {
barChart7,
barChart8,
barChart9,
barChart10
}