间接选择“闪亮”选择输入并显示组

时间:2019-11-19 21:09:42

标签: r shiny flexdashboard

我有一个结合了光泽的flexdashboard,存在以下问题:

在我的情况下,我想选择一个应用程序字段,该字段应显示其所有位置及其销售潜力。 现在,我不知道如何将选择输入与图链接起来,因为图aes是x =现货,y =销售潜力,因此应用字段仅在图中间接表示。

selectInput("af", "Anwendungsfeld auswählen", data_summwwafspot$af)


renderPlotly({ 
  plot_ly(data_summwwafspot,
    x = ~spot,
    y = ~get(input$af),
    name = "Potential world wide per spot and AF",
    color = "red",
    type = 'bar'  
    ) %>% 
    layout(xaxis = list(title="Klebestellen", showline = FALSE, showticklabels = FALSE)) %>% 
    layout(yaxis = list(title="Potential in Mio. €", range=c(0, 200000000))) 
})

我希望描述是可以理解的。非常感谢您的帮助,在此先感谢您。

现在提供一些示例数据:

名称水果 ValueFruit

安东,苹果,1.5

佛罗里达人,香蕉,0,3

安东,杏子,0.1,

克里斯托弗,樱桃,1,2

汤姆,橙色,0.85

弗洛里亚(Florian),葡萄柚(2.0)

安东,柠檬1,8

因此,我想在条形图中显示水果和价值水果,x =水果,y = valueFruit。 选择输入应包括名称,如果我选择例如安东,我想在情节中看到安东的所有成果(和价值)。

0 个答案:

没有答案
相关问题