How to set highchart global options IN R

后端 未结 3 1383
滥情空心
滥情空心 2021-01-17 03:25

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

Here is the api link: http://api.highcharts.com/highcharts#global

I am tryin

3条回答
  •  星月不相逢
    2021-01-17 03:44

    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, highcharter.global, 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.

提交回复
热议问题