Closed Stjin closed 2 years ago
Hi, you are right the colors are reversed in the compose version 🙈 I'm not sure if this is something that we want to change because it would break the functionality for the users who are already using the library. In case you are facing a problem with this then you can use .reverse()
method on the sections in DonutModel.
Reversing the list does change the location of the sections but does not change the colors. This does not seem to be the solution as the donut colors are still rendered incorrectly but reversed. From my perspective it would be better to have the compose version behave the same as the native version.
@Stjin Yeah, you are right. I see the issue. Colors are separated from data internally and then values are reversed but the colors are not. Silly mistake. Thanks for pointing it out. I'm creating a PR with a fix.
@Stjin version 2.2.2 with the fix is released
Awesome! Thanks for the effort!
The only difference I see now is the way the sections are rendered (the order or corner radius), not a huge deal but still a little bit of inconsistency.
@SumeraMartin Could you look into the inconsistency issue as well? Thanks!
Hi,
I am facing an issue and after hours of playground testing I can't tell if I am missing something or if the behaviour between the compose and non-compose version is indeed different. I can't tell if this is a bug or not.
Please refer to the following gist: https://gist.github.com/Stjin/807c430a25adebef76fae8a039cbc2b5
I have created an application with 2 activities
I implemented both the compose as well as the non-compose version of the donut library and recreated 2 identical setups. However the end results is differently rendered. It looks like the compose version reverses the colors?
Hope you can help me out ☺