第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何使用ploty在視圖中顯示端點數(shù)據(jù)?

如何使用ploty在視圖中顯示端點數(shù)據(jù)?

紅糖糍粑 2023-11-11 21:24:06
我正在使用情節(jié)來顯示熱圖。我可以用硬編碼數(shù)據(jù)顯示熱圖。但現(xiàn)在我有了端點,這樣您就可以看到帶有后端數(shù)據(jù)的熱圖。但如果我使用端點數(shù)據(jù),我看不到熱圖。所以我有這個作為模板:<plotly-plot [data]="graph.data" [layout]="graph.layout"</plotly-plot>和這個打字稿:Map:map = {};}所以這有效,我看到了熱圖。但現(xiàn)在如果我這樣做:export interface map {       map?: Array<Array<number>> | null;} Map() {    this.Service                });  }But then the data is not visibleSo what I have to change?So I have it now like this:this.showHeadMap().subscribe((res) => {}因為它使用源作為圖像。但是,如果我加載頁面,我只會看到一個圖表一秒鐘,并且頁面加載是否完成。然后圖表消失。但圖像未顯示。But if I fill in the z with this:來自:[[0.000010752661,you have to do this:z: [[res.push(this.ok.map[0])]],but then for all values
查看完整描述

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'

    }

  ]

 }

});


查看完整回答
反對 回復(fù) 2023-11-11
  • 1 回答
  • 0 關(guān)注
  • 121 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號