简体   繁体   中英

R Highcharter: How to show No Data to Display message?

I have created a dynamic Highchart in R Shiny App. I want to display a customized message when there is no data to display the charts.

In Highchart API, there is setOptions where you can display the customized message. Something similar is mentioned in this question: How to display No Data Available Message in highcharts .

But I haven't found anything similar in Highcharter.

Any solutions?

Within your renderHighcharter function, you can put something like this:

shiny::validate(
            need((nrow(DataSet()) != 0), "No data available based on your selection")
          )

You can have as many validate functions that you need and make them as complicated as you need to help the user troubleshoot.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM