hledger-web graph weirdness/bug

25 views
Skip to first unread message

Marko Kocić

unread,
May 2, 2013, 9:16:13 AM5/2/13
to hle...@googlegroups.com
Hi Simon,

When starting to actually use multiple currencies, I found that that nice and useful graph on hledge-web started to look weird. Take this[1] hledger that demonstrates the problem.

The graph looks fine and well until first $ transaction. Then, It starts to display 300 as a value in graph, regardless of other transactions after that.
To be honest, I don't know what would be the best way to graph when having multiple currencies in an account.
- One way would be to have multiple lines in graph (one per currency).
- Another one would be to calculate and display totals based on current exchange rate extracted from transactions.
- Leave it as is, and suggest a workaround for dealing with multiple currencies.
In general, I am open to hear how are people using multiple currencies in hledger, especially in hledger-web context.

Best regards,
Marko Kocić


[1]
;; -*- mode: ledger-*-

;; Set default currency and format
D 1000.00 €

2013/01/01 Test
    assets:paypal  100
    income:admob

2013/01/02 Test
    assets:paypal  100
    income:admob

2013/01/03 Test
    assets:paypal  100
    income:admob

2013/01/04 Test
    assets:paypal  100
    income:admob

2013/01/05 Test
    assets:paypal  100
    income:admob

2013/01/06 Hosting
    expenses:hosting  300$
    assets:paypal -250

2013/01/07 Test
    assets:paypal  100
    income:admob

Simon Michael

unread,
May 2, 2013, 11:44:32 AM5/2/13
to hle...@googlegroups.com
On May 2, 2013, at 6:16 AM, Marko Kocić wrote:
When starting to actually use multiple currencies, I found that that nice and useful graph on hledge-web started to look weird. Take this[1] hledger that demonstrates the problem.

The graph looks fine and well until first $ transaction. Then, It starts to display 300 as a value in graph, regardless of other transactions after that.
To be honest, I don't know what would be the best way to graph when having multiple currencies in an account.
- One way would be to have multiple lines in graph (one per currency).
- Another one would be to calculate and display totals based on current exchange rate extracted from transactions.
- Leave it as is, and suggest a workaround for dealing with multiple currencies.

Hi Marko,

one line per currency would be awesome. Let's have that. :)

I'm not actually seeing the problem you describe. I pasted your data into t.j, adding a second space before "-250". What account/url are you looking at ? I see e.g. the attached.

In general, I am open to hear how are people using multiple currencies in hledger, especially in hledger-web context.

me too. 

Best
-Simon



Marko Kocić

unread,
May 3, 2013, 2:55:53 AM5/3/13
to hle...@googlegroups.com
Sorry, my bad.
The following transactions demonstrates it better. Here, when you look at assets:paypal, the graph shows a flat line after first $ income, since somehow graph switches from dispalying only € to displaying only $.


;; -*- mode: ledger-*-

;; Set default currency and format
D 1000.00 €

2013/01/01 Test
    assets:paypal  100
    income:admob

2013/01/02 Test
    assets:paypal  100
    income:admob

2013/01/03 Test
    assets:paypal  100
    income:admob

2013/01/04 Test
    assets:paypal  100
    income:admob

2013/01/05 Test
    assets:paypal  50$
    income:admob


2013/01/07 Test
    assets:paypal  100
    income:admob

Cheers,
Marko

Simon Michael

unread,
May 3, 2013, 8:17:28 AM5/3/13
to hle...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages