Highcharts Highchart在Shining应用程序中未占用整个div

Highcharts Highchart在Shining应用程序中未占用整个div,highcharts,shiny,shinyapps,r-highcharter,Highcharts,Shiny,Shinyapps,R Highcharter,我有下面闪亮的应用程序 正如您在这里看到的,当高度定义为百分比而不是px时,highchart并没有占用整个div。但是,对于响应性网页设计,通常需要将高度设置为% 有没有办法正确使用高度的%声明?默认情况下,Highcharts的高度为400px。您可以设置图表高度:“100%” 图表将获得父容器的100%,该容器是闪亮的加载器输出容器,但由于某些原因,此闪亮的加载器输出容器没有获得父容器的100%高度。这似乎是加载器中的一个错误,类闪亮加载器输出容器的div应该具有style=height

我有下面闪亮的应用程序

正如您在这里看到的,当高度定义为百分比而不是px时,highchart并没有占用整个div。但是,对于响应性网页设计,通常需要将高度设置为%


有没有办法正确使用高度的%声明?

默认情况下,Highcharts的高度为400px。您可以设置图表高度:“100%”


图表将获得父容器的100%,该容器是闪亮的加载器输出容器,但由于某些原因,此闪亮的加载器输出容器没有获得父容器的100%高度。

这似乎是加载器中的一个错误,类闪亮加载器输出容器的div应该具有style=height:100%。如果可以,请卸下装载机。
library(shiny)
library(highcharter)
library(shinycustomloader)

Data1 = structure(list(x = c(39, 15, 21, 71, 39, 34, -47, 67, 5, 1, -41, 
                             41, 6, 52, 84, 10, 67, -53, 15, 21, 51), y = c(0, -7, 75, 100, -67, 
                            52, 100, 100, -200, 0, -100, 28, 19, 100, 35, 39, 24, -73, 100, 
                            29, 81), z = c("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", 
                                           "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u")), row.names = c(NA, 
                            -21L), class = "data.frame")

ui <- fluidPage(
  div(style = "height: 1000px; width: 80%; margin: 0; padding: 0; background-color: rgba(0,0,0,.4)",
      div(style = "height: 100%; width: 100%; margin: 0; padding: 0",
          highchartOutput("Result",  width = "100%", height = "100%") %>% withLoader(type = "html", loader = "loader6")
        ))
)

server = function(input, output) {

output$Result = 
        renderHighchart({

            HighCharts_Plot =
                hchart(Data1, "scatter", hcaes(x, y)) %>%
                    hc_chart(plotBorderWidth = 1, plotBorderColor = '#b4b4b4') %>%
                    hc_annotations(list(labelOptions = list(y = 35, x = 0, backgroundColor = 'rgba(0, 0, 0, 0)', borderColor = "rgba(0,0,0,0)"),
                                        labels = list(list(point = list(x = (max(abs(range(Data1$x))) + 0)/2, y = 0, xAxis = 0, yAxis = 0),
                                                            style = list(color = '#6f6f6f', fontSize = 8),
                                                            useHTML = TRUE,
                                                            text = paste("<span style = '", "padding: 3px; background-color: rgba(0,0,0,.4)", "'>AAA  AAA  AAA  AAA  AAA  </span>", sep = ""))))) %>%
                    hc_tooltip(outside = TRUE) 
            HighCharts_Plot

        })

}

shinyApp(ui = ui, server = server)
hc_chart(plotBorderWidth = 1, plotBorderColor = '#b4b4b4', height = '100%') %>%