How to set highchart global options IN R

highcharts set options dynamically
highcharts setoptions
highcharts set series data dynamically
highcharts demo
highcharts options typescript
highcharts series options
highcharts tutorial
highcharts hello world

I see a lot of examples in javascript but I cannot find an example to do it in R

Here is the api link:

I am trying to set "timezoneOffset" and I have tried many different ways. When I do this in R: highChart$global(timezoneOffset=-300) I do not get any warning or error, but it's not working.

Thanks a lot for the help!

Here is a piece of code:


highChart <- Highcharts$new()
highChart$chart(zoomType = "xy")
highChart$exporting(enabled = T)
highChart$xAxis(type="datetime",list( title = list(text = "Time")))
                  list(title = list(text = "Variance"))



As you can see, the timezoneOffset is not working when I run this piece of code and the time is still displayed in GMT.

The highcharter options can be accessed, but they are set inside the standard R options under the list element highcharter.options. They are not given directly to the highchart, and inside highchart(), there is the code line opts <- getOption("highcharter.options", list()).

I don't think there is another way than just get the options, alter whatever options you need to change and then set the options again with your additions.

The following is a simple illustration:


# normal highchart
highchart() %>%
  hc_add_serie_labels_values(1:901, seq(1, 10, 0.01))

opts <- getOption("highcharter.options")
opts$lang$decimalPoint <- "."
options(highcharter.options = opts)

# now with "," instead of "." (confirm in tooltip)
highchart() %>%
  hc_add_serie_labels_values(1:901, seq(1, 10, 0.01))

Of course in your case, you need to set the $global$timezoneOffset part.

How to set options, This article explains how the options object works and how to use it. The options object. Global options. #The options object. When you initialize the chart using its​  Highcharts use a JavaScript object structure to define the options or settings of a chart. This article explains how the options object works and how to use it. The options object. Global options #The options object. When you initialize the chart using its constructor Highcharts.Chart, the options object is the first parameter you pass.

As of version 0.5.0 of highcharter, it seems the option highcharter.options is not there any more, but there are several separate options, e.g. highcharter.lang,, etc. So the following approach works:

lang <- getOption("highcharter.lang")
lang$decimalPoint <- ","
lang$numericSymbols <- highcharter::JS("null") # optional: remove the SI prefixes
options(highcharter.lang = lang)

In addition to changing the decimal point, the SI prefixes ("k", "M", "G", etc.) are turned off by setting the numericSymbols to null, see Replacing/removing the metric notations like thousands "k" abbreviation.

set the globalOptions in the Highcharts String, Hi, I'm running a local Highcharts Export Server based on Java and PhantomJS to render the HighCharts in the Jasper Report. I built some  The highcharter package enables the creation of Highcharts type plots within R. There are two main functions in the package: highchart(): Creates a Highchart chart object using htmlwidgets. The widget can be rendered on HTML pages generated from R Markdown, Shiny, or other applications.

First you have to switch of the useUTC flag to FALSE. Than you can set the timezoneOffset as you wish and save the options back.

global <- getOption("")
global$useUTC <- FALSE
global$timezoneOffset <- -300
options( = global)

For better understanding make sure you take a look at global:


Set Options: Comma Separator · Issue #69 · jbkunst/highcharter , highchart() 'hc_opts' doesn't seem to implement languages, particularly: Highcharts. Or like you set global options for DT package with DT.options argument it's described here in 3. In Highcharts it's quite clear how to disable useUTC, docs with sample. In highcharter, it looks like you should add your comment to this ticket. It's about setting global options in Highcharter. – Paweł Fus Sep 19 '17 at 12:24

Assign a global color theme · Issue #282 · jbkunst/highcharter · GitHub, to set a global color theme.​hc_colors You need to use highcharter.theme in options :. Coming Back to Highcharter, So it is an R wrapper of HighCharts javascript library and its module. The main features of this package are: You can create various charts with the same style like scatter, bubble, time series, heatmaps, treemaps, bar charts, etc.

[PDF] Package 'highcharter', shortcut functions to plot R objects. 'Highcharts' String to define how to save the configuration options. One of 'is' Create a highchart object from a particular data type. Description hcmap(map = "custom/world",. Options Settings Description. options allows the user to set and examine a variety of global ``options'' which affect the way in which R computes and displays its results. Usage options() getOption(x) .Options Arguments

highcharter package, A wrapper for the 'Highcharts' library including shortcut functions to plot R objects. 'Highcharts' is a hc_rangeSelector, Setting scrollbar options to highstock charts​. hc_scrollbar, Setting worldgeojson, World map in Geojson format (list). Options Settings Description. Allow the user to set and examine a variety of global options which affect the way in which R computes and displays its results.. Usage options() getOption(x, default = NULL) .Options

  • Are you using an R package that you are not naming?
  • @SebastianBochan I have updated the code. Thanks for your time.
  • @BondedDust I am using rCharts package