引用这张图片看看我在看什么:
使用此代码:
const colors = [ColorRGBA(0, 255, 125, 0), ColorRGBA(255, 125, 0, 0)]
const fillStyles = colors.map((color) => new SolidFill({ color: color.setA(150) }))
const chart = db.createSpiderChart({
columnIndex: 1,
rowIndex: 0,
columnSpan: 1,
rowSpan: 2
})
.setTitle('Spider chart')
.setBackgroundFillStyle(fillStyles[0])
我得到这个结果:
最佳答案
您可以使用方法 setChartBackgroundFillStyle 更改图表的背景颜色使用所需的 FillStyle
例如:
const colors = [ColorRGBA(0, 255, 125, 0), ColorRGBA(255, 125, 0, 0)]
const fillStyles = colors.map((color) => new SolidFill({ color: color.setA(150) }))
const chart = db.createSpiderChart({
columnIndex: 1,
rowIndex: 0,
columnSpan: 1,
rowSpan: 2
})
.setTitle('Spider chart')
.setBackgroundFillStyle(fillStyles[0])
.setChartBackgroundFillStyle(fillStyles[1])
关于javascript - 我们如何更改蜘蛛图背景颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60322614/