Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional percentage y axis in security chart #3006

Closed

Conversation

OnkelDok
Copy link
Member

@OnkelDok OnkelDok commented Oct 8, 2022

This PR introduces an additional y axis with percentage values on the left side of the diagram.
It shows percentage values of the prices compared to the first quote in chart or the purchase price (depending on the configured mode):

Mode market trend

grafik

Mode development to purchase price

grafik

In logarithmic mode this new y axis is disabled/invisible.

Also requested here: https://forum.portfolio-performance.info/t/prozentuale-achsen-beschriftung-im-kursdiagramm/6333

@OnkelDok OnkelDok changed the title New percentage y axis New percentage y axis in security chart Oct 8, 2022
@OnkelDok OnkelDok marked this pull request as draft October 8, 2022 19:37
@OnkelDok

This comment was marked as resolved.

@OnkelDok OnkelDok marked this pull request as ready for review October 8, 2022 20:56
@OnkelDok OnkelDok changed the title New percentage y axis in security chart Additional percentage y axis in security chart Oct 9, 2022
@OnkelDok
Copy link
Member Author

After feedback in the forum I added chart settings for show/hide the horizontal marker lines for both axes.
The user can now decide from which of the axes the horizontal lines should be displayed. In the current version, the lines of both axes can be displayed simultaneously.
Another possibility would be to make only the lines from one of the two axes displayable at a time (behaviour like radio buttons where only one item of a the two options can be active).
I can change the behavior to that if desired.

grafik

@pfalcon
Copy link
Contributor

pfalcon commented May 27, 2023

Hey @OnkelDok, great work on improving the chart widget in PP (this and other patches, e.g. the measurement tool)!

Github currently says "This branch has conflicts that must be resolved", so would you mind to rebase this PR on the current master?

Also, I wonder if you saw @chirlu's comments on suggested patch workflow: #3248 (comment) (and following comments there) and agree with them? E.g.:

Corrections should not be separate commits, but be squashed into the original commit they are fixing.

In the ideal world, following that would workflow allow patches to be reviewed/merged faster/easier. It would also allow others to test them in the meantime easier. (I'd be interested to try it when I have time for example.)

Thanks!

@OnkelDok
Copy link
Member Author

OnkelDok commented May 27, 2023

Thank you, @pfalcon, for pointing out about open conflicts. I haven't checked this PR for a long time. Are there automatic notifications when a PR moves into conflicting state after commits in the target branch?

I understand @chirlu s points, but have to admit that I have not followed them in a lot of my past PRs. This project is my first experience with github. Are there global github best practices of creating, expand and maintain PRs or is this more project specific?
I think in some of my first PRs I asked @buchen if I should squash, and I think I remember he answered that he could do this step easily before merging the PR into target branch. But I cannot find the comment at the moment.

@OnkelDok OnkelDok force-pushed the percentage_y_axis branch 2 times, most recently from e56375d to e2df237 Compare May 27, 2023 20:29
@OnkelDok OnkelDok force-pushed the percentage_y_axis branch from e2df237 to c64027d Compare May 27, 2023 20:30
@buchen
Copy link
Member

buchen commented May 30, 2023

Thanks @OnkelDok for the contribution.

A couple of thoughts:

  • First I think it should not be the default to show two axis. Personally, I am fine with one axis and want to avoid the visual clutter. If we make it an options, users can decide on their own. I have added that.
  • Second, I think it is very confusing to not have any horizontal lines at all (and I also find it confusing to have both - I already made a screenshot to share a "bug" here until I realized that is the design)

BTW, @OnkelDok are you using the Resource Bundle Editor plugin? It sorts the keys in the correct position, it escapes all special characters (and it just makes it easier to edit all translations of one key at once). You might want to check it out.

buchen pushed a commit that referenced this pull request May 30, 2023
* chart options to show/hide horizontal lines for both axis

Issue: #3006
Signed-off-by: OnkelDok <[email protected]>
[squashed commits; rebased to master]
Signed-off-by: Andreas Buchen <[email protected]>
buchen added a commit that referenced this pull request May 30, 2023
@buchen
Copy link
Member

buchen commented May 30, 2023

merged :-)

@buchen buchen closed this May 30, 2023
@OnkelDok
Copy link
Member Author

BTW, @OnkelDok are you using the Resource Bundle Editor plugin? It sorts the keys in the correct position, it escapes all special characters (and it just makes it easier to edit all translations of one key at once). You might want to check it out.

Yes, I think I used it in this PR. But I'm not 100% sure.

Thank you for merging.

@OnkelDok OnkelDok deleted the percentage_y_axis branch May 30, 2023 12:41
@pfalcon
Copy link
Contributor

pfalcon commented May 31, 2023

@OnkelDok:

Are there automatic notifications when a PR moves into conflicting state after commits in the target branch?

Not that I know of. But Github gets updated all the time, so, who knows. Otherwise I guess can check from time to time, or rely on passers-by to ping about it ;-).

I understand @chirlu s points, but have to admit that I have not followed them in a lot of my past PRs. This project is my first experience with github.

Ah, great work then again!

Are there global github best practices of creating, expand and maintain PRs or is this more project specific?

I'd say it's more project-specific, though a lot of well-maintained projects seem to converge on similar set of guidelines, at least in spirit. I for one found @chirlu's recommendations very familiar and well-resonating with my own experince, that's why I brought them up ;-).

Btw, unrelated and offtopic, but did you see a situation when for a low-amplitude security, an Y scale is being selected poorly, so that the chart is shown as almost a flatline? I saw such cases, and interested to debug it, that's why I'm looking into charts-related patches, to see how other folks hacked on them.

christen90 pushed a commit to christen90/portfolio that referenced this pull request Aug 2, 2023
* chart options to show/hide horizontal lines for both axis

Issue: portfolio-performance#3006
Signed-off-by: OnkelDok <[email protected]>
[squashed commits; rebased to master]
Signed-off-by: Andreas Buchen <[email protected]>
christen90 pushed a commit to christen90/portfolio that referenced this pull request Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants