library(echarts4r)
# Sample data
data <- data.frame(
Category = c("A", "B", "C", "D", "E"),
Value = c(80, 50, 60, 70, 40)
)
# Creating a radar chart
e_charts(data, Category) |>
e_radar(Value)
I tried following with no rotation in the labels A, B, ..., E:
e_charts(data, Category) |>
e_radar(Value) |>
e_radar_opts(
axisLabel = list(
rotate = 45
)
)
You need to set the nameRotate
property of the indicator
object.
library(echarts4r)
# Sample data
data <- data.frame(
Category = c("A", "B", "C", "D", "E"),
Value = c(80, 50, 60, 70, 40)
)
# Creating a radar chart
e_charts(data, Category) |>
e_radar(Value) |>
e_radar_opts(
axisName = list(
color = "blue",
formatter = JS("function (value, indicator) {
indicator.nameRotate = 45;
return value;
}")
)
)