Hello! Is there any chance logarithmic scale feature could be added to the Performance Chart?
Thank you!
chirlu
March 29, 2025, 11:30pm
2
As is often the case: Yes, if someone implements it.
For reference, same topic in German:
Hallo,
als erstes groĂes Lob fĂŒr das Programm, kenne nichts Vergleichbares oder Besseres in dieser Art!
Vor allem das Performance-Diagramm ist fĂŒr mich interessant, deswegen meine Frage bzw. Bitte, ob ihr auch eine logarithmische Darstellung möglich machen könntet, damit ein prozentual gleichbleibender Anstieg von Wertpapieren bei lĂ€ngeren ZeitrĂ€umen (ĂŒber 1 Jahr) nicht beschleunigt erscheint bzw. eine sich verlangsamende Entwicklung auch als solche zu erkennen ist.
Auf eure Antwort bin ich gâŠ
1 Like
Thank you for the reply. Looks like it could be implemented if someone finishes that PR and approves.
Maybe we are not that far. One of the comment was that the labels of the Y-tick of the scale were sparse, however I thinks this has been resolved or improved since with the update of swtchart from 0.7.0 to 1.0.0 (this can be seen in the tick of the log chart of Securities Price).
Adding the github pull request link here (as referenced in the German topic referenced above) by @chirlu
master
â RomanLangrehr:log-performance
opened 09:38PM - 07 May 21 UTC
This feature was requested several times, but I not implemented because the grap⊠h drawing library swtchart âdoes not support log scale with negative valuesâ. Well, that is not really a limitation of swtchart, the log function is simply defined only for positive values and using a log scale with negative/zero values makes mathematically no sense.
However, it makes sense when you start with 100% and not 0% (as long as you donât lose everything or more than your invested amount). I implemented this, but tweaked the scale to start still with 0% in the GUI. The implemenation is in a very similar fashion to the security chart.
Here is an example how it looks:

and here are the GUI controls to activate the log scale:

I think it would be nice to have more ticks/labels in the log scale, but found no way to do this. I think this is really a limitation of the swtchart library.
The users scale choice (linear or log) is currently not stored in the .xml file, because I don't know how to do this here. (In contrast to the security chart view, we dont have access to the `name.abuchen.portfolio.model.Client` object here.
Fixes #208
Fixes #1461
Fixes #1449