I use the echarts4r package in R. When I run the code below, I get a bar chart where the x-axis labels (countries' names) are partially hidden. The last bar displaying 18000 is for South Africa, but it is completely hidden. Is it possible to make the countries' names visible without changing their positions on the chart?
library(echarts4r)
country <- c("Côte d'Ivoire", "Papua New Guinea", "Republic of Venezuela", "The United Kingdom ", "South Africa")
quantity <- c(2000, 500, 1800, 2500, 18000)
df <- data.frame(country, quantity)
df %>%
e_charts(country) %>%
e_bar(quantity,
label = list(show = TRUE,
position = "insideEnd",
offset = c(535, 17)),
showBackground = TRUE,
itemStyle = list(color = "#490B3D")
) %>%
e_x_axis(
axisTick = list(show = FALSE),
axisLine =list(show = FALSE),
axisLabel = list(show = TRUE, inside = TRUE),
inverse = TRUE
) %>%
e_y_axis(show = FALSE) %>%
e_flip_coords() %>%
e_legend(show = FALSE)