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

Display Total Value and Custom Label in Pie Chart #1893

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Lyq322
Copy link

@Lyq322 Lyq322 commented Aug 9, 2023

What kind of change does this PR introduce? (check one with "x")

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior? (You can also link to an open issue here)
Issue #1568
Bug when explode slices and doughnut are both true:
Screenshot 2023-08-08 at 7 55 13 PM

What is the new behavior?
Screenshot 2023-08-08 at 7 52 58 PM
Total is displayed inside pie chart. The text "TOTAL" can be changed and font size of both number of text can be customized. The number is shortened using suffixes such as K, M, B and scientific notation (e) for numbers even greater.
New behavior for when both explode slices and doughnut are true:
Screenshot 2023-08-08 at 7 56 15 PM

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

Displays total inside pie chart when display type is doughnut.
Added option and customization to total displayed in pie chart, including font size and display text.
Due to total-number and total-text not in DOM yet when font size was updated
}

.pieTotal {
font-weight: 400;

Choose a reason for hiding this comment

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

Question: do we really need this class? Is it default weight?

Copy link
Author

Choose a reason for hiding this comment

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

It's not default weight. The default weight is too light/thin:
Screenshot 2023-12-24 at 11 32 35 AM

src/app/app.component.ts Outdated Show resolved Hide resolved
@IrisTien
Copy link

Can we provide a better title for this pull request?

@Lyq322 Lyq322 changed the title Pie total Display Total Value and Custom Label in Pie Chart Dec 24, 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.

2 participants