Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

legend_action

Legend


Description

Legend

Usage

e_legend_select(e, name, btn = NULL)

e_legend_unselect(e, name, btn = NULL)

e_legend_toggle_select(e, name, btn = NULL)

e_legend_scroll(e, scroll_index = NULL, legend_id = NULL, btn = NULL)

Arguments

e

An echarts4r object as returned by e_charts or a proxy as returned by echarts4rProxy.

name

Legend name.

btn

A e_button id.

scroll_index

Controle the scrolling of legend when type = "scroll" in e_legend.

legend_id

Id of legend.

Examples

e <- CO2 %>%
  group_by(Type) %>%
  e_charts(conc) %>%
  e_scatter(uptake)

e %>%
  e_legend_unselect("Quebec")

e %>%
  e_legend_unselect("Quebec", btn = "btn") %>%
  e_button("btn", "Quebec")

echarts4r

Create Interactive Graphs with 'Echarts JavaScript' Version 5

v0.4.0
Apache License (>= 2.0)
Authors
John Coene [aut, cre, cph], Wei Su [ctb], Helgasoft [ctb], Xianying Tan [ctb] (<https://orcid.org/0000-0002-6072-3521>)
Initial release
2021-03-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.