Home > Net >  How I can hide labels on e_pie (Echarts4r)?
How I can hide labels on e_pie (Echarts4r)?

Time:10-22

Hi and thanks for read me I make a pie plot and I can to remove all the labels for the chart but I can't find a way to do this, anyone knows how I can do this? The code im using is the following:

mtcars |>
  head() |>
  tibble::rownames_to_column("model") |> 
  e_charts(model) |>
  e_pie(carb) |> 
  e_legend(FALSE)

I want to remove this:

enter image description here

CodePudding user response:

You can pass further options to the e_pie function, including label options, as defined here:

library(echarts4r)
    
mtcars |>
  head() |>
  tibble::rownames_to_column("model") |> 
  e_charts(model) |>
  e_pie(carb, legend = FALSE, label = list(show=FALSE)) 

Or alternatively, you can also use the built-in functions where appropriate:


mtcars |>
  head() |>
  tibble::rownames_to_column("model") |> 
  e_charts(model) |>
  e_pie(carb) |>
  e_legend(show = FALSE) |>
  e_labels(show = FALSE)

  • Related