多彩柱状完成
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user