react-native-percentage-circle
react-native-percentage-circle copied to clipboard
Less than 50 bug still exsit in the current version.
I use the newest version of the index.js and still encounter the less than 50 bug with Android. and I found that this PR has solved it already #10.
Let me see. Maybe I should check the platform. This PR results in another bug in ios devices. Let me try it.
could you paste some pictures? @Symous
@JackPu in the current version of index.js , if we put 25% to the component , it will show 75% . but if we put 75% to the component it will show 75% as expected. I have modified the code to identify the different platform,now it worked well with Android .But still not tested with iOS.Maybe I will test it with iOS in a few days and do a PR.
Hi @JackPu, I have same problem as you can see on image below

This screenshot is taken from ios simulator...
I've found issue, just changed this
backgroundColor: this.props.percent < 50 ? this.props.bgcolor : this.props.color,
to
backgroundColor: this.props.color,
and everything is fine. Can someone else check this also?
这个问题解决了没,我在ios设备上还是会出现 "react": "16.0.0-alpha.6", "react-native": "0.44.0", "react-native-percentage-circle": "^1.0.6",
This issue is still present on "react-native-percentage-circle": "^1.0.6",
i have solved the issue,you need change these codes:
#line 11 import Platform
#line 96
// rightTransformerDegree = '0deg'; // leftTransformerDegree = -(50-percent) * 3.6 + 'deg';
if (Platform.OS == 'ios') { leftTransformerDegree = '0deg'; rightTransformerDegree = percent * 3.6 + 'deg'; }else{ leftTransformerDegree = '0deg'; rightTransformerDegree = -(50-percent) * 3.6 + 'deg'; }
#line 157
//backgroundColor: this.props.percent < 50 ? this.props.bgcolor : this.props.color,
backgroundColor: Platform.OS == 'ios' ? this.props.color : this.props.percent < 50 ? this.props.bgcolor : this.props.color,
line number maybe is wrong,just search the code :)

@a4101823 it seems not work when a percent likes 30.64