Reputation: 53
I called highchart with height parameter to make a taller chart successfully in RStudio:
chart <- highchart(type = "stock", height=800, ...)
When in Shiny, the chart shown up but ignore the height parameter. Is there any way to fix it ?
Upvotes: 1
Views: 2488
Reputation: 3029
If you are using shiny you can set the dimension in the highchartOutput()
function:
# ui.R
...
highchartOutput("my_hc_id", width = 450, height = 300)
...
Other way using the hc_size
function compared with the @pork-chop answer:
library(quantmod)
library(highcharter)
x <- getSymbols("GOOG", auto.assign = FALSE)
b <- hchart(x)
b <- hc_size(b, width = 450, height = 300)
b
Upvotes: 4
Reputation: 29387
Try this:
library(quantmod)
library(highcharter)
x <- getSymbols("GOOG", auto.assign = FALSE)
a <- hchart(x)
a$width <- 450
a$height <- 300
a
Upvotes: 2