gnunet-svn
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]