[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 14/32: fix bars
From: |
gnunet |
Subject: |
[taler-taler-ios] 14/32: fix bars |
Date: |
Mon, 16 Oct 2023 00:03:12 +0200 |
This is an automated email from the git hooks/post-receive script.
marc-stibane pushed a commit to branch master
in repository taler-ios.
commit 483e5fa2e18f0af439bdcbb0d6c18663dc7d42de
Author: Marc Stibane <marc@taler.net>
AuthorDate: Fri Oct 13 10:33:19 2023 +0200
fix bars
---
TalerWallet1/Views/HelperViews/BarGraph.swift | 27 +++++++--------------------
1 file changed, 7 insertions(+), 20 deletions(-)
diff --git a/TalerWallet1/Views/HelperViews/BarGraph.swift
b/TalerWallet1/Views/HelperViews/BarGraph.swift
index a842c01..936b852 100644
--- a/TalerWallet1/Views/HelperViews/BarGraph.swift
+++ b/TalerWallet1/Views/HelperViews/BarGraph.swift
@@ -20,17 +20,14 @@ struct BarGraph: View {
}
var body: some View {
- let slice = transactions.prefix(8)
- let eightTransactions: [Transaction] = Array(slice)
- let count = eightTransactions.count
- let maxValue = maxValue(eightTransactions)
+ let slice = transactions.prefix(10)
+ let count = slice.count
+ let tenTransactions: [Transaction] = Array(slice)
+ let maxValue = maxValue(tenTransactions)
- HStack(alignment: .firstTextBaseline, spacing: 1) {
-#if DEBUG
-// Text("first")
-#endif
+ HStack(alignment: .center, spacing: 1) {
if count > 0 {
- ForEach(Array(eightTransactions.enumerated()), id: \.element)
{ index, transaction in
+ ForEach(Array(zip(slice.indices, slice)), id: \.0) { index,
transaction in
let common = transaction.common
let incoming = common.incoming()
let netto = common.amountEffective.value
@@ -50,19 +47,9 @@ struct BarGraph: View {
}
}
}
-// if count < 8 {
-// ForEach(count...8, id: \.self) {_ in
-// Rectangle()
-// .opacity(0.001)
-// .frame (width: 3, height: barHeight * 2 )
-// }
-// }
-#if DEBUG
-// Text("last")
-#endif
}
.accessibilityHidden(true) // cannot speak out this bar chart info
-// .flippedDirection() // draw first array item on trailing edge
+ .flippedDirection() // draw first array item on trailing
edge
}
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] branch master updated (bb640f0 -> 65313c5), gnunet, 2023/10/15
- [taler-taler-ios] 04/32: CallStack, gnunet, 2023/10/15
- [taler-taler-ios] 19/32: AccessibilityNotification.Announcement, gnunet, 2023/10/15
- [taler-taler-ios] 01/32: products seem no longer mandatory, gnunet, 2023/10/15
- [taler-taler-ios] 18/32: updateExchange, gnunet, 2023/10/15
- [taler-taler-ios] 14/32: fix bars,
gnunet <=
- [taler-taler-ios] 03/32: Debugging, gnunet, 2023/10/15
- [taler-taler-ios] 17/32: getCurrencySpecification, gnunet, 2023/10/15
- [taler-taler-ios] 02/32: Layout for QR-View and ThreeAmounts, gnunet, 2023/10/15
- [taler-taler-ios] 08/32: cleanup, gnunet, 2023/10/15
- [taler-taler-ios] 13/32: width of rendered string, gnunet, 2023/10/15
- [taler-taler-ios] 10/32: secret token, gnunet, 2023/10/15
- [taler-taler-ios] 15/32: TwoRowButtons, gnunet, 2023/10/15
- [taler-taler-ios] 05/32: No spellout, gnunet, 2023/10/15
- [taler-taler-ios] 09/32: TabBar for Taler Wallet - GNU Taler stays on SideView, gnunet, 2023/10/15
- [taler-taler-ios] 16/32: Source of Truth for balances, gnunet, 2023/10/15