在新标签页中打开Barplot中的链接

时间:2018-12-27 16:12:16

标签: r shiny flexdashboard

我想知道是否可以在新标签页中打开与每个栏相关的链接 我的代码如下:

highchart() %>%
hc_chart(type = "bar") %>%
hc_xAxis(categories = data$link) %>%
hc_add_series(name ="number sold",data = data$n_sold)%>%
hc_add_theme(thm)%>%
hc_plotOptions(
  series = list(
    cursor = "pointer",
    point = list(
      events = list(
        click = JS( "function () { location.href = this.category; }")
        )
      )
    )
  ) 

我想知道是否有可以在R中使用的javscript代码,该代码允许我在新标签页中打开,并更新以下代码:

click = JS( "function () { location.href = this.category; }")

0 个答案:

没有答案
相关问题