improved dashboard

This commit is contained in:
Bojan Kucera 2025-06-02 20:31:22 -04:00
parent 114c280734
commit 90168ba619
8 changed files with 781 additions and 47 deletions

View file

@ -34,10 +34,9 @@
</mat-card>
<mat-card class="p-6">
<div class="flex items-center justify-between">
<div>
<div class="flex items-center justify-between"> <div>
<p class="text-sm text-gray-600">Last Update</p>
<p class="text-lg font-semibold text-gray-900">{{ new Date().toLocaleTimeString() }}</p>
<p class="text-lg font-semibold text-gray-900">{{ currentTime() }}</p>
</div>
<mat-icon class="text-purple-600 text-3xl">access_time</mat-icon>
</div>

View file

@ -45,45 +45,52 @@ export class MarketDataComponent {
},
{
symbol: 'GOOGL',
price: 138.21,
change: -1.82,
changePercent: -1.30,
volume: 23450000,
marketCap: '1.75T',
high52Week: 152.10,
low52Week: 125.45
price: 2847.56,
change: -12.34,
changePercent: -0.43,
volume: 12450000,
marketCap: '1.78T',
high52Week: 3030.93,
low52Week: 2193.62
},
{
symbol: 'MSFT',
price: 378.85,
change: 4.12,
changePercent: 1.10,
volume: 34560000,
marketCap: '2.82T',
high52Week: 384.30,
price: 415.26,
change: 8.73,
changePercent: 2.15,
volume: 23180000,
marketCap: '3.08T',
high52Week: 468.35,
low52Week: 309.45
},
{
symbol: 'TSLA',
price: 248.42,
change: -3.21,
changePercent: -1.28,
volume: 67890000,
marketCap: '789B',
price: 248.50,
change: -5.21,
changePercent: -2.05,
volume: 89760000,
marketCap: '789.2B',
high52Week: 299.29,
low52Week: 138.80
low52Week: 152.37
},
{
symbol: 'AMZN',
price: 145.67,
change: 1.89,
changePercent: 1.31,
volume: 29340000,
marketCap: '1.52T',
high52Week: 155.20,
price: 152.74,
change: 3.18,
changePercent: 2.12,
volume: 34520000,
marketCap: '1.59T',
high52Week: 170.17,
low52Week: 118.35
}
]);
protected displayedColumns: string[] = ['symbol', 'price', 'change', 'changePercent', 'volume', 'marketCap'];
protected currentTime = signal<string>(new Date().toLocaleTimeString()); constructor() {
// Update time every second
setInterval(() => {
this.currentTime.set(new Date().toLocaleTimeString());
}, 1000);
}
}