3

参考这张图片,看看我在看什么:

[1]

使用此代码:

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])

我得到这个结果:

[2]

4

1 回答 1

4

您可以使用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])
于 2020-02-20T15:02:32.143 回答