Skip to content

Instantly share code, notes, and snippets.

@tcash21
Created September 7, 2016 18:03
Show Gist options
  • Save tcash21/9b102819c0dec216866fb08d019c5d12 to your computer and use it in GitHub Desktop.
Save tcash21/9b102819c0dec216866fb08d019c5d12 to your computer and use it in GitHub Desktop.
radarchart jittery issue
library(radarchart)
labs <- c(1:25)
scores <- list("Rich" = rnorm(25, 1, 10),
"Andy" = rnorm(25, 10, 5),
"Aimee" = rnorm(25, 20, 5))
shinyServer(function(session, input, output) {
getData <- reactive({
return(scores[input$name == names(scores)])
})
output$radar <- renderChartJSRadar({
s <- getData()
opList <- list()
#opList$multiTooltipTemplate <- "<%= value.toFixed(3) %> - <%= datasetLabel %>"
chartJSRadar(scores = s, labs = labs, polyAlpha = 0.0, showToolTipLabel = TRUE, maxScale = 25)
})
})
library(shiny)
library(radarchart)
options(digits=3, stringsAsFactors = TRUE)
shinyUI(pageWithSidebar(
headerPanel('feature-v1api test'),
sidebarPanel(
selectInput(inputId = 'name', label='Select Name:', choices=c("Rich", "Andy", "Aimee"))
# actionButton(inputId = 'search.button', 'Search')
),
mainPanel(
chartJSRadarOutput("radar", width='500')
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment