Search code examples
recharts4r

how to move chart to the left with echart4r


enter image description here

this is my chart and it has a blank space on the left, and I want to move the chart so the blank space is reduced

df_x %>% 
  e_chart(Description) %>% 
  e_bar(max, label =list(show= T , position = "right", formatter = "{b}")) %>% 
  e_tooltip(trigger = "axis") %>% 
  e_flip_coords() %>% 
  e_y_axis(axisLabel = list(inside = TRUE), 
    axisTick = list(show = FALSE),
    axisLine = list(show = FALSE)) %>% 
  e_legend(show = FALSE)

here is my code


Solution

  • You can use the e_grid() function to adjust the padding.

    For example e_grid(left = '5%')