Search code examples
rvisualizationecharts4r

Remove the circular points in a line chart


Using echarts4r package for R, is there a way to remove the selectable circular points in a line series? For example

mtcars %>% e_charts(mpg) %>% e_title("MTCARS", "Test chart") %>% 
    e_line(drat) %>% e_line(wt)

Zooming in on the chart, there are the little circular points.

Circular points in line chart

This is OK when there are not too many, however when the data set is large, these circles create a bubble bath effect and hide the lines.


Solution

  • You can change the symbol argument to the e_line function:

    library(echarts4r)
    mtcars %>% e_charts(mpg) %>% e_title("MTCARS", "Test chart") %>% 
      e_line(drat, symbol='none') %>% e_line(wt, symbol='none')
    

    see: https://echarts.apache.org/en/option.html#series-line for more info. :)