1

Hi and thanks for reading me I am working on a simple bar chart in Echarts4r and I would like to label the bars with the value, but include commas in large numbers. So far I have not found a solution for this, does anyone have any ideas how I could do this?

My code is the following:

library(echarts4r)
iris |> 
  group_by(Species) |> 
  summarise(total = sum(Sepal.Length)*1000) |> 
  e_charts(Species) |> 
  e_bar(total,
        label = list(
          show = TRUE,
          rotate = 90,
          verticalAlign = "middle",
          textStyle = list(fontFamily = "Roboto Condensed", 
                           fontSize = 15)
           ), name = " Valor"
        )

Thanks for the help

1 Answers1

1

JavaScript treats 250,300 as two numbers, therefore it is not appropriate for echarts.

TarJae
  • 72,363
  • 6
  • 19
  • 66