1 回答

TA貢獻(xiàn)1860條經(jīng)驗 獲得超8個贊
將 showHeadMap 更改為以下內(nèi)容:-
showHeadMap() {
return this.aggregateCameraHeatmapsService
.aggregateHeatmaps('2020-11-09 10:00:00', '2020-12-10 14:15:00', 4, '1')
.pipe(map((res) => {
this.cameraAgretateHeadMap.heatmap = res.heatmap.slice(0, 1);
return this.cameraAgretateHeadMap.heatmap;
}));
}
然后分配圖表,例如:-
this.showHeadMap().subscribe((res) => {
this.graph = {
data: [
{
z: [res],
type: 'heatmap',
showscale: false,
colorscale: colorScale,
opacity: 0.7,
zsmooth: 'best'
}
]
}
});
添加回答
舉報