#r #highcharts #shiny
#r #высокие диаграммы #блестящий
Вопрос:
По какой-то странной причине я не могу отобразить диаграмму, но похоже, что selectizeGroupUI фильтрует правильно. Я перепробовал почти все, что было в моих силах, чтобы понять, что происходит, но, к сожалению, я не могу отобразить диаграмму highcharter, спасибо! Источник данных:
введите описание изображения здесь
library(tidyverse) library(highcharter) library(shinyWidgets) library(shiny) library(dplyr) tib lt;- read.csv(file = "~/bcl-data.csv" , stringsAsFactors = FALSE) ui lt;- pageWithSidebar( headerPanel("Painting 8"), sidebarPanel( selectizeGroupUI( id = "my-filters", inline = FALSE, params = list( var_one = list(inputId = "Type", title = "Select Type", placeholder = 'select'), var_two = list(inputId = "Country", title = "Select Country", placeholder = 'select'), var_three = list(inputId = "Subtype", title = "Select Subtype", placeholder = 'select'), var_four = list(inputId = "Name", title = "Select Name", placeholder = 'select') ) ) ), mainPanel( highchartOutput('Tibplot') ) ) server lt;- function(input, output, session) { res_mod lt;- callModule( module = selectizeGroupServer, id = "my-filters", data = tib, vars = c("Type", "Country", "Subtype", "Name") ) output$Tibplot lt;- renderHighchart({ bar lt;- res_mod() CleanData lt;- bar %gt;% filter(var_one %in% input$Type ) %gt;% filter(var_two %in% input$Country ) %gt;% filter(var_three %in% input$Subtype ) %gt;% filter(var_four %in% input$Name ) hchart(CleanData , "column", hcaes(x = Country, y = Price), name = "Price", color = "#1f7bd4",showInLegend = TRUE) %gt;% hc_add_series(CleanData, "column", hcaes(x = Country, y = Alcohol_Content), name = "Alcohol Level",color = "#e2393b", showInLegend = TRUE) %gt;% hc_title(text = "PRICE VS ALCHOLOL LEVEL", align = "center", style = list(fontSize = "20px", color = "#06072a", fontWeight = "bold"), margin = 10) %gt;% hc_plotOptions(column= list( # stacking = "normal", borderWidth = 0 )) }) } shinyApp(ui = ui, server = server)
Комментарии:
1. Пожалуйста, поделитесь результатами
dput(your.data.frame)
.