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

Feat: Make pies resizeable and remove titles #50

Merged
merged 4 commits into from
Nov 6, 2024
Merged

Conversation

MonikaFu
Copy link
Contributor

@MonikaFu MonikaFu commented Nov 5, 2024

Closes #51

In this PR I:

  • make pie charts adjust their size to the div they are in
  • remove the titles with selectors from pie charts
  • modify the annotation with total coverage (simplify)
  • change the name of .js plot file to align with other plots

NOTE: the layout of the portfolio view needs to change in another PR for the change to be fully visible and to look good.

@MonikaFu MonikaFu requested a review from jdhoffa November 5, 2024 16:11
// Plot labels
let numbers_long = { M: ' million', G: ' billion', T: ' trillion' };
let unit = 'USD'; // TODO: make a parameter
let comment = 'Total: ';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let comment = 'Total: ';
let comment = 'Exposure of Assets to PACTA Sectors: ';

I would rather not merge the "Total" caption in, since we know that is confusing.
Let's use this for now as it is at least accurate, and then Nayra can validate all these things after a more in-depth review.

Relates to #51

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect that the plot will have a descriptive title in which case I am not sure if 'Total' is not enough. Also, in case of emissions I don't think we can call it 'exposure'?

Copy link
Member

@jdhoffa jdhoffa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment.
Otherwise, I built and inspected this and it looks good locally

@MonikaFu MonikaFu requested a review from jdhoffa November 6, 2024 09:54
@MonikaFu
Copy link
Contributor Author

MonikaFu commented Nov 6, 2024

@jdhoffa I extended the annotation and made it variable.

Copy link
Member

@jdhoffa jdhoffa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great!

@MonikaFu MonikaFu merged commit b8e275c into main Nov 6, 2024
4 of 5 checks passed
@MonikaFu MonikaFu deleted the resizing-piecharts branch November 6, 2024 12:40
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.

Think of a better annotation text for pie charts
2 participants