Skip to content

Commit 203cb4c

Browse files
authored
Merge pull request #109 from IgniteUI/mkirova/optimize-small-size
Optimize for small sizes on lading page.
2 parents 3e0297b + ef832b2 commit 203cb4c

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

projects/finance-grid/src/app/finance-grid/finance-grid.component.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<igx-grid [data]="data$ | async" [rowSelection]="'multiple'" [isLoading]="isLoading" class="grid-sizing">
1+
<igx-grid [data]="data$ | async" [isLoading]="isLoading" class="grid-sizing">
22
<igx-grid-toolbar>
33
<igx-grid-toolbar-title>Financial Portfolio</igx-grid-toolbar-title>
44
<igx-input-group type="search">
@@ -10,19 +10,17 @@
1010
<igx-grid-toolbar-exporter></igx-grid-toolbar-exporter>
1111
</igx-grid-toolbar-actions>
1212
</igx-grid-toolbar>
13-
<igx-column field="id" header="Symbol" sortable="true" [width]="'7%'"></igx-column>
14-
<igx-column field="holdingName" header="Asset" sortable="true" [width]="'15%'">
13+
<igx-column field="id" header="Symbol" [width]="'7%'" [minWidth]="'68px'"></igx-column>
14+
<igx-column field="holdingName" header="Asset" sortable="true" [width]="'15%'" [minWidth]="'100px'">
1515
<ng-template igxCell let-cell="cell" let-val>
1616
<div class="assets-container">
1717
<igx-avatar [src]="getPathToImage(val)" [shape]="'rounded'"></igx-avatar>
1818
<span>{{ val }}</span>
1919
</div>
2020
</ng-template>
2121
</igx-column>
22-
<igx-column field="positions" header="Position" sortable="true" [dataType]="'number'" [width]="'6%'"></igx-column>
23-
<igx-column field="value.boughtPrice" header="Average Cost/Share" dataType="currency" sortable="true" [width]="'10%'"></igx-column>
24-
<igx-column field="value.currentPrice" header="Last Price" [dataType]="'currency'" sortable="true" [width]="'7%'"></igx-column>
25-
<igx-column field="dailyPercentageChange" header="Daily Change %" dataType="percent" [cellClasses]="profitLossValueClasses" sortable="true" [width]="'10%'">
22+
<igx-column field="value.currentPrice" header="Last Price" [dataType]="'currency'" [width]="'7%'" [minWidth]="'80px'"></igx-column>
23+
<igx-column field="dailyPercentageChange" header="Change %" dataType="percent" [cellClasses]="profitLossValueClasses" [width]="'10%'" [minWidth]="'85px'">
2624
<ng-template igxCell let-val>
2725
<div class="assets-container">
2826
<div>
@@ -37,8 +35,8 @@
3735
</div>
3836
</ng-template>
3937
</igx-column>
40-
<igx-column field="marketValue" header="Market Value" [dataType]="'currency'" sortable="true" [width]="'5%'"></igx-column>
41-
<igx-column field="profitLossValue" header="NET Profit/Loss" sortable="true" dataType="currency" [width]="'10%'" [cellClasses]="profitLossValueClasses">
38+
<igx-column field="marketValue" header="Market Value" [dataType]="'currency'" [width]="'5%'" [minWidth]="'100px'"></igx-column>
39+
<igx-column field="profitLossValue" header="NET Profit" dataType="currency" [width]="'10%'" [minWidth]="'90px'" [cellClasses]="profitLossValueClasses">
4240
<ng-template igxCell let-val>
4341
<div class="assets-container">
4442
<div>
@@ -53,7 +51,7 @@
5351
</div>
5452
</ng-template>
5553
</igx-column>
56-
<igx-column field="profitLossPercentage" header="NET Profit/Loss %" sortable="true" dataType="percent" [width]="'10%'" [cellClasses]="profitLossValueClasses">
54+
<igx-column field="profitLossPercentage" header="NET Profit %" dataType="percent" [width]="'10%'" [minWidth]="'98px'" [cellClasses]="profitLossValueClasses">
5755
<ng-template igxCell let-val>
5856
<div class="assets-container">
5957
<div>
@@ -68,17 +66,19 @@
6866
</div>
6967
</ng-template>
7068
</igx-column>
71-
<igx-column field="allocation" header="Allocation" sortable="true" dataType="percent" [width]="'10%'">
69+
<igx-column field="allocation" header="Allocation" dataType="percent" [width]="'10%'" [minWidth]="'100px'">
7270
<ng-template igxCell let-val>
7371
<div class="progress-container">
74-
<div>
72+
<div style="width: 42px;">
7573
{{ val | percent : "1.0-2" }}
7674
</div>
7775
<igx-linear-bar [value]="val * 100" [animate]="false" textVisibility="false"></igx-linear-bar>
7876
</div>
7977
</ng-template>
8078
</igx-column>
81-
<igx-column field="holdingPeriod" header="Holding Period" sortable="true" [width]="'8%'">
79+
<igx-column field="value.boughtPrice" header="Average Cost" dataType="currency" [width]="'10%'" [minWidth]="'100px'"></igx-column>
80+
<igx-column field="positions" header="Position" [dataType]="'number'" [width]="'6%'" [minWidth]="'80px'"></igx-column>
81+
<igx-column field="holdingPeriod" header="Holding Period" [width]="'8%'" [minWidth]="'50px'">
8282
<ng-template igxCell let-val> {{ val }} days </ng-template>
8383
</igx-column>
8484
</igx-grid>

0 commit comments

Comments
 (0)