react-native-circular-progress
react-native-circular-progress copied to clipboard
Customize the maximum value of full circle
I added a new prop for maximum value which was 100 and its default is 100 now. I need to set a totally different maximum value logic and this prop simply solves it.
It makes the library more customizable now.
Thank you for the library tho! It is awesome! @bartgryszko
Here is the basic example of the maximumValue
prop. In this example the maximumValue
is 8
and fill
is 2
so the circle is working with the maximum value now.

When will this be merged? Looks like a good feature @bartgryszko
You can reach this feature with this one:
"react-native-circular-progress": "github:WrathChaos/react-native-circular-progress",
I think he did not maintain the library anymore. Maybe I can fork it and maintain it. Let's see.
Sure thanks 👍
In case someone needs this feature with the current version we can just percentages. So below will fill the bar to 250 out of a max of 500.
const maxvalue = 500;
<AnimatedCircularProgress
size={200}
width={3}
backgroundWidth={30}
fill={(250 / maxvalue) * 100}
tintColor="#00e0ff"
backgroundColor="#3d5875"
>
{fill => <Text style={styles.points}>{Math.round((maxvalue* fill) / 100)}</Text>}
</AnimatedCircularProgress>