Code Monkey home page Code Monkey logo

highcharter-shiny's People

Contributors

jbkunst avatar kellobri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

highcharter-shiny's Issues

valuebox-and-sparklines compatibility

Hi Joshua,

Great work on 04-shinydashboard-n-spakrlines. Loved it!

I am having hard time making these widgets compatible with shiny apps outside shinydashboard.

For instance, the widgets are not behaving in the following UI configuration. Any suggestions are much appreciated.

llibrary(bslib) # Control bs_theme & additional bs rules bs_add_rules
ui <- bootstrapPage(
  theme = bs_theme(version = 5, bootswatch = "cerulean"),
  fluidRow(
    valueBoxOutput("vbox"),
    valueBoxOutput("vbox2"),
    valueBoxOutput("vbox3")
  )
)

The dataframe with only 1 row can't display 3D bar whereas dataframe with more than one rows can display 3D bars.

Hello there,

I am trying to produce 3d barchart with highcharter with z-axis label and x-axis label showing.
But when my dataframe has only one row the chart doesnot display the bars. If the dataframe consist of more than one row it displays properly.

I want to be able to display 1 row from the dataframe also in the chart.

Below is a reproducible example:

library(shiny)
library(highcharter)

shinyApp(
  
  ui <- fluidPage(
    fluidRow(
      highchartOutput('chart')
    )
  ),
  
  server <- function(input, output, session) {
    
    df <- data.frame(
      Z1 = c(1, 2, 1, 4),
      Z2 = c(2, 3, 2, 7),
      Z3 = c(6, 3, 7, 4),
      Z4 = c(3, 4, 1, 5)
    )
    
    df <- df[-(1:3),] #reduced dataframe to 1 row
    
    
    dta <- lapply(seq(ncol(df)), function(x) {
      list(
        name = colnames(df)[x], 
        data = df[, x]
      ) 
    })
    
    output$chart <- renderHighchart({
      
      highchart() %>%
        hc_chart(
          type = "column", 
          options3d = list(
            enabled = TRUE,
            beta = 20,
            alpha = 30,
            depth = 400,
            viewDistance = 10
          )
        ) %>%
        hc_xAxis(categories = row.names(df[1:nrow(df)-1,])) %>%
        hc_zAxis(
          min = 0,
          max = 3,
          categories = colnames(df)
        ) %>%
        hc_plotOptions(
          series = list(
            depth = 100,
            grouping = FALSE,
            groupZpadding = 10
          )
        ) %>%
        hc_add_series_list(dta)
    })
  })

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.