could you please tell me how to make the pie chart conditional ,i mean when i click on one part of pie it must render something whatever the condition is given and same for other slice of it.
i tried to come up with a solution but it didn't work out for me.
what i did ...
1.) tried to print the values in verbatimtextbox of pie chart,by default it render the position i guess like (0 & 1)
2.) then captured those position and given the condtion within it
let's say
i have a pie chart and i want to render different plotly chart on click event of each slice,two diferent plotly chart in my case then
i captured it like..
note: link1 is source of pie chart that i wanna add event on
cd<-event_plotly('plotly_click',source='link1')
if(cd$pointnumber==0)
{
output$plotly<-renderplotly({
barchart 1 for totalraj #different dataset
})}
else{
if(cd$pointernumber==1)
output$plotly<-renderplotly({
barchart 2 for totalother #different dataset
})}
else{
return(NULL)
}
but it doesn't look like a logical solution to me ,could you please guide me through this case.
i have added condition for second case again coz if i don't write it that way,when i click on position '0' then it would work and when click on position '1' then it gonna throw the else part and when i tried to reverse the position ,it didn't work out .so i am kinda stuck in this case for fairly long time,could you please tell me best possible logical way to get it done
i am late to respond due to time difference ,i guess ,trying to figure it out