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

[Feature] - Pressable pies on pie chart #599

Open
mersimoski opened this issue Jan 29, 2023 · 1 comment
Open

[Feature] - Pressable pies on pie chart #599

mersimoski opened this issue Jan 29, 2023 · 1 comment

Comments

@mersimoski
Copy link

Hello, i dont know if it already exists but is it possible to have a pressable pie of the pie chart, im generating text over the pies and if i add onPress on them it works only on the text press which is not good UX, i want the whole part of a certain pie percentange to be clickable, thanks in advance.

@RKhatri93
Copy link

RKhatri93 commented Feb 14, 2023

Hi @mersimoski, you can pass the onPress action in the data array. Like the below array.

const data = [
{
key: 1,
amount,
svg: {
fill: '#212120',
onPress: () => {
Alert.alert('onPress', '1')
}
},
label: '1',
completedAt: new Date()
},]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants