title: How to use images/icons as labels in highcharter? R shiny
body: <p>I am using highcharter to make a bar plot, in a shiny app, but I am having troubles displaying icons as labels on the x-axis. The goal is to use svg images from a file placed in the working directory.</p>
  <p>I have attached an example below and I have searched inspiration in the following two links but I am having troubles getting the JS-function into R shiny - setup.
  <a href="https://www.highcharts.com/demo/column-comparison" rel="nofollow noreferrer">https://www.highcharts.com/demo/column-comparison</a>
  <a href="https://www.highcharts.com/forum/viewtopic.php?t=16609" rel="nofollow noreferrer">https://www.highcharts.com/forum/viewtopic.php?t=16609</a></p>
  <p>I though the problem was the backslach before quotation marks, but when I display the icon in my app  just using
  <code>tags$div(HTML(&quot;&lt;img src = \&quot;logoA.svg\&quot;&gt;&quot;))</code>, it displays perfectly (logoA.svg is placed in the www folder)</p>
  <p>Any suggestions how to solve this?</p>
  <pre><code>  
  library(shiny)
  library(highcharter)
  library(dplyr)
  
  
  ## app.R ##
  server &lt;- function(input, output) {
    output$plot&lt;- renderHighchart({
      
      Label1&lt;- c(&quot;A&quot;,&quot;A&quot;,&quot;B&quot;,&quot;B&quot;)
      Label2&lt;- c(&quot;1&quot;,&quot;2&quot;,&quot;1&quot;,&quot;2&quot;)
      Val&lt;- runif(4,0,100)
      col&lt;-c(&quot;#d21e1e&quot;,&quot;#009beb&quot;,&quot;#ff5a1a&quot;,&quot;#009beb&quot;)
      Data&lt;-data.frame(Label1,Label2,Val,col)
   
      highchart(type=&quot;chart&quot;) %&gt;%
        hc_add_series(data = Data,type = &quot;column&quot;,
                      hcaes(x = Label1,
                            y = Val,
                            group = Label2,
                            color = col),
                      dataLabels = list(enabled = TRUE, format='{point.mean}'))%&gt;%
        hc_legend(enabled = F)%&gt;% 
        hc_xAxis(type= 'category', useHTML=T, labels=list(formatter = JS(&quot;function(){
                                                            if(this.value == 'A'){
                                                              return '&lt;img src=\&quot;logoA.svg\&quot;&gt;&lt;/img&gt;';
                                                            }else if(this.value == 'B')
                                                              return '&lt;img src=\&quot;logoB.svg\&quot;&gt;&lt;/img&gt;';
                                                            }&quot;)) )
  
    })
  }
  
  ui &lt;- fluidPage(
    tags$div(
      HTML(&quot;&lt;img src=\&quot;logoA.svg\&quot;&gt;&lt;/img&gt;&quot;)
    ),
    
    highchartOutput(&quot;plot&quot;)
    
  )
  
  shinyApp(ui = ui, server = server)
  </code></pre>