2
ズームした領域の座標をハイハットに光沢のあるアプリで保存することはできますか?R Highcharterズーム選択領域
私はこのexample'sに似た何か希望:ちょうどそれらを保存し、それらを使用するために、
function getSelection(event) {
alert(event.xAxis[0].min);
alert(event.xAxis[0].max);
}
代わりの警告を。
サンプル光沢のあるアプリ:
library(shiny)
library(dplyr)
library(highcharter)
library(tidyr)
df_plot <- cbind(
seq(0, 1, by = 0.1),
sample(seq(from = 100, to = 300, by = 10), size = 11, replace = TRUE),
sample(seq(from = 1, to = 100, by = 9), size = 11, replace = TRUE),
sample(seq(from = 50, to = 60, by = 2), size = 11, replace = TRUE),
sample(seq(from = 100, to = 130, by = 1), size = 1, replace = TRUE)
) %>% as.data.frame()
names(df_plot) <- c("x", "a", "b", "c", "d")
ui <- fluidPage(
column(
width = 3,
selectInput("select", "Select var:", choices = c("a", "b", "x", "y"), selected = c("a", "b", "x"), multiple = TRUE)
),
column(
width = 9
),
column(
width = 12,
highchartOutput("plot")
)
)
server <- function(input, output){
output$plot <- renderHighchart({
highchart() %>%
hc_xAxis(categories = df_plot$x) %>%
hc_add_series(data = df_plot$a) %>%
hc_add_series(data = df_plot$b, yAxis = 1) %>%
hc_yAxis_multiples(
list(lineWidth = 3, lineColor='#7cb5ec', title=list(text="First y-axis")),
list(lineWidth = 3, lineColor="#434348", title=list(text="Second y-axis"))) %>%
hc_chart(
zoomType = "x"
)
})
}
shinyApp(ui, server)