R 闪亮-对齐打印轴
我有一个闪亮的应用程序,有两个条形图和一个热度图,它们有相同的x轴(年份),我想在所有的图中对齐年份,但我不知道怎么做。下面是我的UI代码:R 闪亮-对齐打印轴,r,shiny,plotly,R,Shiny,Plotly,我有一个闪亮的应用程序,有两个条形图和一个热度图,它们有相同的x轴(年份),我想在所有的图中对齐年份,但我不知道怎么做。下面是我的UI代码: ui = fluidPage( titlePanel("Global Terrorism, is it getting worse?"), tabsetPanel( tabPanel("Plot", fluid = TRUE, sidebarLayout
ui = fluidPage(
titlePanel("Global Terrorism, is it getting worse?"),
tabsetPanel(
tabPanel("Plot", fluid = TRUE,
sidebarLayout(
sidebarPanel(radioButtons(
inputId="radio",
label="Variable Selection Type:",
choices=list(
"All Countries",
"Select a Country"
),
selected="All Countries")
,conditionalPanel(
condition = "input.radio != 'All Countries'",
selectInput("Country", "Select Country", choices = sort(unique(mydat$Country)), selected = "Iraq"),
sliderInput("freq", "Minimum Frequency:",min = 1, max = 50, value = 15),
sliderInput("max", "Maximum Number of Words:", min = 1, max = 100, value = 100)
), width=2),
mainPanel(fluidRow(
column(8, plotlyOutput("trendbarPlot", height = "200px",width = 845)),
column(8, plotlyOutput("trendheatrPlot", height = "300px",width = 845)),
column(2, plotOutput("WordCloud", height = "200px",width = 400)),
column(8, plotlyOutput("trendstakbarPlot", height = "200px",width = 895))
)
)
)
),
tabPanel("Map", fluid = TRUE,
sidebarLayout(
sidebarPanel(sliderInput("year", "Select Year:", min = 1968, max = 2009, value = 2009, sep='')),
mainPanel(
htmlOutput("Attacks")
)
)
)
)
请与示例数据集共享您的服务器代码。如果没有最简单的工作示例,将很难帮助您。我的代码太长,无法在注释框中发布。你能告诉我应该如何提供它吗?你可以编辑你的问题并将其添加到那里。请与示例数据集共享你的服务器代码。如果没有最简单的工作示例,将很难帮助您。我的代码太长,无法在注释框中发布。你能告诉我该如何提供它吗?你可以编辑你的问题并添加到那里。