I have an app with three radio buttons. I use plotly to show barchart based on user selection of radio buttons. For some selections, there is no data on x-axis of the plotly so the plot is showing up as below:
For those selections, I want to show a message that there is no data available. I used the following code in the renderPlotly, the NA graph doesn't show up but also the message is not being displayed.
need(!(input$x %in% c("A","B")),"Data is not available")
Do you know the possible solution?