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

Fixed: Pie Chart percentage does not display on demo project #5143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leson1106
Copy link

Issue Link 🔗

I didn't see any issues relevant to this. However, it's happening on both Swift and Objective-c targets in the demo project. The Pie Chart percentage doesn't show up even DefaultValueFormatter was set.

Simulator Screenshot - iPhone 14 - 2024-01-13 at 16 08 37

Goals Soccer ⚽

Make Pie Chart percentage show up.

Implementation Details 🚧

Move NumberFormatter constructor and setValueFormatter(formatter:) function below chartView.data = data. I saw on the didSet implementation of ChartData, that each data in ChartData will be re-assigned to defaultValueFormatter if the valueFormatter of each data is a DefaultValueFormatter subtype. So, no matter what formatter is set, it will be replaced.

Testing Details 🔍

I've tested on both Swift and Objective-c targets. It works as expected.

Simulator Screenshot - iPhone 14 - 2024-01-13 at 16 20 19

Simulator Screenshot - iPhone 14 - 2024-01-13 at 16 20 33

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.

1 participant