Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

345
Views
How to change names of menuItems in R highcharter when exporting

I have the following code within the highchart package for R:

  hc_exporting(enabled = TRUE,
               buttons = list(contextButton = list(menuItems = 
                                                     c("viewFullscreen","separator", "downloadJPEG", "downloadPDF","separator", "downloadCSV"))))

I would like to rename those selected buttons to custom names. So far, they look like this:

enter image description here

I tryed JS, but would prefer a solution without it, as I am not familiar with JS and could not find export functions for csv and the proper function for fullscreen. However, the working solution for pdf would look like this:

  hc_exporting(enabled = TRUE,
           buttons = list(contextButton = 
                            list(menuItems = list(list(text = "als <b> PDF </b> speichern",onclick = JS("function () { \n this.exportChart({\n type: 'application/pdf'\n }); \n }")),

So basically, I am searching a way to rename the menuItems within hihgcharter or for the JS functions for exporting csv and for fullscreen. Thanks!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

So I found the option to rename the menuItems within the global options of r-highcharter (anlog to this solution for highcharts). See:

hcoptslang <- getOption("highcharter.lang")

hcoptslang$contextButtonTitle <-"Optionen"
hcoptslang$downloadCSV <- "als CSV-Datei herunterladen"
hcoptslang$downloadJPEG <- "als JPEG-Datei herunterladen"
hcoptslang$downloadPDF <- "als PDF-Datei herunterladen"
hcoptslang$viewFullscreen <- "im Vollbild betrachten "
hcoptslang$exitFullscreen <- "Vollbild verlassen"

options(highcharter.lang = hcoptslang)
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!