Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

348
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda