echarts4r: e_mark_line 符号和名称
echarts4r: e_mark_line symbol and name
如何更改使用 e_mark_line 生成的行的标签?这是我的尝试,而不是显示数字 200,我希望它有我自己的标签。
library(echarts4r)
library(tidyverse)
line <- list(
xAxis = 200
, name = "label 1"
)
USArrests %>%
e_charts(Assault) %>%
e_scatter(Murder, Rape) %>%
e_mark_line(data = line, symbol = "none", name = "label 2")
标线、点、面的底层echarts JavaScript比较复杂。标题必须在 data
中指定。在开发版本中有方便 title
相关参数。
library(echarts4r)
cars %>%
e_charts(speed) %>%
e_scatter(dist, symbol_size = 5) %>%
e_legend(FALSE) %>%
# manual
e_mark_line(data = list(xAxis = 7, symbol = "rect", label = list(formatter = "tortoise"))) %>%
# convenience arguments in latest github version
e_mark_line(data = list(xAxis = 12), title = "Speed Limit") %>%
e_mark_line(data = list(xAxis = 22), title = "Need for Speed")
如何更改使用 e_mark_line 生成的行的标签?这是我的尝试,而不是显示数字 200,我希望它有我自己的标签。
library(echarts4r)
library(tidyverse)
line <- list(
xAxis = 200
, name = "label 1"
)
USArrests %>%
e_charts(Assault) %>%
e_scatter(Murder, Rape) %>%
e_mark_line(data = line, symbol = "none", name = "label 2")
标线、点、面的底层echarts JavaScript比较复杂。标题必须在 data
中指定。在开发版本中有方便 title
相关参数。
library(echarts4r)
cars %>%
e_charts(speed) %>%
e_scatter(dist, symbol_size = 5) %>%
e_legend(FALSE) %>%
# manual
e_mark_line(data = list(xAxis = 7, symbol = "rect", label = list(formatter = "tortoise"))) %>%
# convenience arguments in latest github version
e_mark_line(data = list(xAxis = 12), title = "Speed Limit") %>%
e_mark_line(data = list(xAxis = 22), title = "Need for Speed")