mirror of
https://github.com/cf-sonr/motr.git
synced 2026-01-12 02:59:13 +00:00
* feat: enhance modularity by relocating core packages * refactor: move chart components to dashboard package * refactor: restructure database access layer * refactor: rename credential descriptor to credentials for clarity * feat: enhance development environment configuration for database interactions * feat: integrate go-task for database migrations * feat: introduce middleware for market data and WebAuthn
21 lines
450 B
Plaintext
21 lines
450 B
Plaintext
package charts
|
|
|
|
import "fmt"
|
|
|
|
type DateValue struct {
|
|
Date string
|
|
Value int
|
|
}
|
|
|
|
templ AreaChart(data []DateValue) {
|
|
for _, d := range data {
|
|
<div class="flex flex-col">
|
|
<div class="flex justify-between">
|
|
<span class="text-sm font-medium text-gray-900">${ d.Date }</span>
|
|
<span class="text-sm font-medium text-gray-900">${ fmt.Sprintf("%d", d.Value) }</span>
|
|
</div>
|
|
<div class="h-1 bg-gray-200 rounded-full"></div>
|
|
</div>
|
|
}
|
|
}
|