r - Draggable only part of a series : highcharts -


i drag points when x greater 5.

can me on that?

example:

library("shiny") library("highcharter")  ui <- shinyui(   fluidpage(     column(width = 8, highchartoutput("hcontainer", height = "500px")),     column(width = 4, textoutput("text"))   ) )  server <- function(input, output) {          <- data.frame(b = letters[1:10], c = 11:20, d = 21:30, e = 31:40)    output$hcontainer <- renderhighchart({            canvasclickfunction <- js("function(event) {shiny.oninputchange('canvasclicked', [this.name, event.point.category]);}")     legendclickfunction <- js("function(event) {shiny.oninputchange('legendclicked', this.name);}")      highchart() %>%        hc_xaxis(categories = a$b) %>%        hc_add_serie(name = "c", data = a$c) %>%       hc_add_serie(name = "d", data = a$d) %>%        hc_add_serie(name = "e", data = a$e) %>%       hc_plotoptions(series = list(stacking = false, events = list(click = canvasclickfunction, legenditemclick = legendclickfunction))) %>%       hc_chart(type = "column")    })          makereactivebinding("outputtext")    observeevent(input$canvasclicked, {     outputtext <<- paste0("you clicked on series ", input$canvasclicked[1], " , bar clicked category ", input$canvasclicked[2], ".")    })    observeevent(input$legendclicked, {     outputtext <<- paste0("you clicked legend , selected series ", input$legendclicked, ".")   })    output$text <- rendertext({     outputtext         }) }  shinyapp(ui, server) 


Comments