]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+my-library/+my-video-channels/my-video-channels.component.html
Lazy load charts when listing my channels
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-library / +my-video-channels / my-video-channels.component.html
index c1ded0f6d3dd16c1a3cbb72152a9be8c5f602b91..89327b065d98ae72271d342152dd2c10d8ec3c7b 100644 (file)
         <my-delete-button label (click)="deleteVideoChannel(videoChannel)"></my-delete-button>
       </div>
 
-      <div *ngIf="!isInSmallView" class="w-100 d-flex justify-content-end">
-        <p-chart *ngIf="chartOptions && videoChannelsChartData && videoChannelsChartData[i]" type="line" [data]="videoChannelsChartData[i]" [options]="chartOptions" width="40vw" height="100px"></p-chart>
+      <div *ngIf="!isInSmallView" class="w-100 d-flex justify-content-end chart-container">
+        <div myDeferLoading>
+          <ng-template>
+            <p-chart
+              *ngIf="chartOptions && videoChannelsChartData && videoChannelsChartData[i]"
+              width="40vw" height="100px"
+              type="line" [data]="videoChannelsChartData[i]" [options]="chartOptions"
+            ></p-chart>
+          </ng-template>
+        </div>
       </div>
     </div>
   </div>