title: Radar Chart Axis Labels with Echarts4r
body: <p>I am developing an R Shiny app with echarts4r visualization package.</p>
  <p><strong>Current Problem:</strong> I try plotting radar chart with axis labels shown only in one dimension. But when I set the axisLabel show parameter true, the  axis labels of all the axis are shown.
  <a href="https://i.stack.imgur.com/6Vmt2.png" rel="nofollow noreferrer">Current Problem</a></p>
  <p><strong>Desired Outcome</strong>: Axis labels shown only on one dimension.</p>
  <p><a href="https://i.stack.imgur.com/B7j03.png" rel="nofollow noreferrer">Desired graph is somewhat similiar to this one</a></p>
  <p><strong>What I tried so far</strong></p>
  <ul>
  <li>Including formatter function on axislabel parameter and somehow filter the axis labels being shown on graph. It did not work out because I am not expert on HTML and JS integration to R.</li>
  <li>Tried to come up with text graphics to embed one set of axis labels to the main radar chart but I did not succeed.</li>
  </ul>
  <p>Here is the dummy code that I used for this chart.</p>
  <p><strong>What I am looking for at the moment</strong></p>
  <ul>
  <li>First best solution: modify the “axisLabel show parameter” in that it allows to show axis labels for only one dimension.</li>
  <li>Second best solution: Any workaround for including these axis labels as text element, or custom formatter function to customize them for the radar chart in the desired way.</li>
  </ul>
  <pre><code># ## server.R ##
  library(shiny)
  library(echarts4r)
  library(data.table)
  
  dataset &lt;- data.table(categories = c(&quot;A&quot;,&quot;B&quot;,&quot;C&quot;,&quot;D&quot;), 
                        rate1 = c(4,2,1,4), rate2 = c(3,2,3,1), rate3 = c(4,5,4,5), 
                        rate4 = c(2,3,3,3), rate5 = c(3,2,2,4))
  
  server &lt;- function(input, output, session) {
  
    spw1 &lt;- reactive({
      rows &lt;- (dataset$categories %in% input$categories)
      data_plot &lt;- dataset[rows,c('categories','rate1','rate2','rate3','rate4','rate5'), drop = FALSE]
      data_plot &lt;- data.table(data_plot) 
      data_plot &lt;- melt(data_plot, measure.vars = c('rate1','rate2','rate3','rate4','rate5'))
      data_plot &lt;- reshape(data_plot, idvar = &quot;variable&quot;, timevar = &quot;categories&quot;, direction = &quot;wide&quot;)
  
      if (length(input$categories) == 1){
      names(data_plot)[2] &lt;- &quot;var1&quot;
        }
      data_plot
      })
    
    #radar plot
    output$radar = renderEcharts4r({ 
  
     if (length(input$categories) == 1){ 
       if(!nrow(spw1()))
        return()
  
      plot &lt;- spw1() %&gt;%
        e_charts(variable)  %&gt;%
        e_radar(var1, min=0, max = 5,
              radar = list(axisTick = list(show = FALSE), center = c(&quot;50%&quot;, &quot;50%&quot;), 
                          axisLabel = list(show = TRUE), splitNumber=5))
      plot
      }
    })
  }
  
  ui &lt;- fluidPage(
    titlePanel(&quot;Radar Chart!&quot;),
    sidebarLayout(
      sidebarPanel(
        pickerInput(inputId = &quot;categories&quot;,
                    label = &quot;Categories&quot;,
                    choices = unique(sort(dataset$categories)),
                    multiple = TRUE,
                    selected = 'A',
                    options = list(`actions-box` = TRUE)),
      ),
  
      mainPanel(
        echarts4rOutput(outputId = &quot;radar&quot;)
  
      )
    )
  )
  </code></pre>