标签: rbokeh

在闪亮的应用程序中为 rbokeh 图设置 xlim

我正在为 R使用rbokeh 包。我在集成到一个闪亮的应用程序中取得了一些不错的结果。我现在想集成一个功能,其中dateRangeInput现在将选择图表的日期范围(它是时间序列数据)。

##necessary packages

install.packages("shiny")
install.packages("devtools")
install.packages("dplyr")
library(devtools)
devtools::install_github("ramnathv/htmlwidgets")
devtools::install_github("bokeh/rbokeh")
library(rbokeh)
library(dplyr)
library(shiny)

#example data set

james<-mtcars[c("mpg")]
james$date<-seq(from=as.Date("2013-05-16"),to=as.Date("2013-06-16"),by="days")
james$index<-1:4

#shiny app

shiny_example <- function(chart_data = james){

  date_minmax <- range(chart_data$date)

  shinyApp(
    ui=fluidPage(
      titlePanel("a plot"),
      sidebarLayout(
        sidebarPanel(
          textInput("index","Enter the index from 1 to 16",value=1),
          uiOutput("date_range")
        ),
        mainPanel(
          rbokeh::rbokehOutput("plot_cars")
        )
      )
    ),
    server=function(input,output,session)
    {
      current_data <- reactive({
        current_df <- subset(james,index==input$index)
        return(current_df)
      })
      output$date_range <- renderUI({
        plot_data <- current_data()
        current_id_range <- range(plot_data$date)
        return(
          dateRangeInput("date_range",
                         "Date Range(X Axis", …
Run Code Online (Sandbox Code Playgroud)

r shiny bokeh rbokeh

5
推荐指数
1
解决办法
654
查看次数

如何为散景数据表中的行和/或单元格着色?

从开始Initial table,我需要突出显示(color)元素,如表示例之一所示Ex. 1, Ex. 2, Ex. 3

在此处输入图片说明

任何的想法?

bokeh rbokeh bokehjs

2
推荐指数
1
解决办法
2412
查看次数

标签 统计

bokeh ×2

rbokeh ×2

bokehjs ×1

r ×1

shiny ×1