Skip to content

fix: use String#characters instead of substring for truncation in circular charts. #1661

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

Closed
wants to merge 1 commit into from

Conversation

btrautmann
Copy link

@btrautmann btrautmann commented Feb 9, 2024

This PR is just being used to demonstrate that we can fix the below mentioned issue by using package:characters (which is exported via the Flutter SDK). Currently, the circular_data_label_helper uses substring when truncating text which is prone to causing issues if the input String contains, for instance, emojis like 🍕 that are comprised of multiple code points. This is explained in more detail in this comment.

Notes:

Before:

After:

Fixes #1611.

@PreethikaSelvam
Copy link
Contributor

Hi @btrautmann,

We would like to let you know that we have logged two feature requests.

The first feature request (FR) is to reposition the data label based on the available space. In this case, the shift position will be modified based on the available size.

FR Link: https://www.syncfusion.com/feedback/42028/improve-the-data-label-positioning-based-on-the-available-place

The second FR is to restrict the data label builder size instead of hiding it based on the available size.

FR Link: https://www.syncfusion.com/feedback/50685/provide-an-option-to-trim-the-data-label-builder-instead-of-hiding-it-based-on-the

Therefore, the above two feature requests are correct and as mentioned in previous updates, they will be implemented in one of our upcoming releases.

Furthermore, we are pleased to hear that you have discovered the root cause here: https://github.com/syncfusion/flutter-widgets/pull/1661. We will check this and consider all related features to determine the feasibility of incorporating your fix into our feature request implementation while implementing this feature: https://www.syncfusion.com/feedback/50685/provide-an-option-to-trim-the-data-label-builder-instead-of-hiding-it-based-on-the.

Regards,

Preethika Selvam.

@LavanyaGowtham2021 LavanyaGowtham2021 added the charts Charts component label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
charts Charts component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[syncfusion_flutter_charts] Pie Chart data labels throw Invalid argument(s): string is not well-formed UTF-16
3 participants