早上好,
我正在创建一个三维散射光图,我想在三维散射光图表系列/#Lightningchart中有单独的颜色。我已将个性化PointSizeEnabled设置为true以及:
我的系列:
const pointSeries3D_yclass = chart3D.addPointSeries({ individualPointSizeEnabled: true })
.setPointStyle(new PointStyle3D.Triangulated({
fillStyle: new SolidFill({ color: ColorRGBA(245, 66, 209, 100) }),
size: 3,
shape: 'sphere'
}))
.setName('1 januari')
我的系列数据:
pointSeries3D_yclass.add([
{ x: 5.9738, y: -7.79972678, z: 347.9487, size: 15, value: 1902, color: ColorRGBA(0, 255,0) },
{ x: 5.1842, y: -7.69972678, z: 301.9554},
{ x: 4.0684, y: -7.19972678, z: 236.965},
{ x: 6.5575, y: 4.20027322, z: 381.9437, size: 20, value: 2022, color: ColorRGBA(0,255,0 )}
])
尺寸确实有效,但颜色不行,在哪里以及如何启用单独的颜色/填充颜色?
请参阅https://www.arction.com/lightningchart-js-api-documentation/v3.4.0/interfaces/pointseriesoptions3d.html#individualpointcolorenabled
1:individualPointColorEnabled
必须在创建系列时启用。
// Example, enable PointSeries3D data `color` property.
const pointSeries3D = chart3D.addPointSeries({
individualPointColorEnabled: true
})
2:individualPointColorEnabled
必须启用才能使用IndividualPointFill
设置PointSeries3D的样式。有关详细信息,请参见PointSeries3D.setPointStyle。
因此,在您的代码片段中,将fillStyle更改为new IndividualPointFill()