Skip to content

Optimize for small sizes on lading page. #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: vnext
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<igx-grid [data]="data$ | async" [rowSelection]="'multiple'" [isLoading]="isLoading" class="grid-sizing">
<igx-grid [data]="data$ | async" [isLoading]="isLoading" class="grid-sizing">
<igx-grid-toolbar>
<igx-grid-toolbar-title>Financial Portfolio</igx-grid-toolbar-title>
<igx-input-group type="search">
Expand All @@ -10,19 +10,17 @@
<igx-grid-toolbar-exporter></igx-grid-toolbar-exporter>
</igx-grid-toolbar-actions>
</igx-grid-toolbar>
<igx-column field="id" header="Symbol" sortable="true" [width]="'7%'"></igx-column>
<igx-column field="holdingName" header="Asset" sortable="true" [width]="'15%'">
<igx-column field="id" header="Symbol" [width]="'7%'" [minWidth]="'68px'"></igx-column>
<igx-column field="holdingName" header="Asset" sortable="true" [width]="'15%'" [minWidth]="'100px'">
<ng-template igxCell let-cell="cell" let-val>
<div class="assets-container">
<igx-avatar [src]="getPathToImage(val)" [shape]="'rounded'"></igx-avatar>
<span>{{ val }}</span>
</div>
</ng-template>
</igx-column>
<igx-column field="positions" header="Position" sortable="true" [dataType]="'number'" [width]="'6%'"></igx-column>
<igx-column field="value.boughtPrice" header="Average Cost/Share" dataType="currency" sortable="true" [width]="'10%'"></igx-column>
<igx-column field="value.currentPrice" header="Last Price" [dataType]="'currency'" sortable="true" [width]="'7%'"></igx-column>
<igx-column field="dailyPercentageChange" header="Daily Change %" dataType="percent" [cellClasses]="profitLossValueClasses" sortable="true" [width]="'10%'">
<igx-column field="value.currentPrice" header="Last Price" [dataType]="'currency'" [width]="'7%'" [minWidth]="'80px'"></igx-column>
<igx-column field="dailyPercentageChange" header="Change %" dataType="percent" [cellClasses]="profitLossValueClasses" [width]="'10%'" [minWidth]="'85px'">
<ng-template igxCell let-val>
<div class="assets-container">
<div>
Expand All @@ -37,8 +35,8 @@
</div>
</ng-template>
</igx-column>
<igx-column field="marketValue" header="Market Value" [dataType]="'currency'" sortable="true" [width]="'5%'"></igx-column>
<igx-column field="profitLossValue" header="NET Profit/Loss" sortable="true" dataType="currency" [width]="'10%'" [cellClasses]="profitLossValueClasses">
<igx-column field="marketValue" header="Market Value" [dataType]="'currency'" [width]="'5%'" [minWidth]="'100px'"></igx-column>
<igx-column field="profitLossValue" header="NET Profit" dataType="currency" [width]="'10%'" [minWidth]="'90px'" [cellClasses]="profitLossValueClasses">
<ng-template igxCell let-val>
<div class="assets-container">
<div>
Expand All @@ -53,7 +51,7 @@
</div>
</ng-template>
</igx-column>
<igx-column field="profitLossPercentage" header="NET Profit/Loss %" sortable="true" dataType="percent" [width]="'10%'" [cellClasses]="profitLossValueClasses">
<igx-column field="profitLossPercentage" header="NET Profit %" dataType="percent" [width]="'10%'" [minWidth]="'98px'" [cellClasses]="profitLossValueClasses">
<ng-template igxCell let-val>
<div class="assets-container">
<div>
Expand All @@ -68,17 +66,19 @@
</div>
</ng-template>
</igx-column>
<igx-column field="allocation" header="Allocation" sortable="true" dataType="percent" [width]="'10%'">
<igx-column field="allocation" header="Allocation" dataType="percent" [width]="'10%'" [minWidth]="'100px'">
<ng-template igxCell let-val>
<div class="progress-container">
<div>
<div style="width: 42px;">
{{ val | percent : "1.0-2" }}
</div>
<igx-linear-bar [value]="val * 100" [animate]="false" textVisibility="false"></igx-linear-bar>
</div>
</ng-template>
</igx-column>
<igx-column field="holdingPeriod" header="Holding Period" sortable="true" [width]="'8%'">
<igx-column field="value.boughtPrice" header="Average Cost" dataType="currency" [width]="'10%'" [minWidth]="'100px'"></igx-column>
<igx-column field="positions" header="Position" [dataType]="'number'" [width]="'6%'" [minWidth]="'80px'"></igx-column>
<igx-column field="holdingPeriod" header="Holding Period" [width]="'8%'" [minWidth]="'50px'">
<ng-template igxCell let-val> {{ val }} days </ng-template>
</igx-column>
</igx-grid>