- 已编辑
Cloud2016
不用 tooltip,改成增加 label 也行,如下:
quakes |>
e_charts(x = long) |>
e_geo(roam = TRUE,
map = "world",
boundingCoords = list(c(165.67,-38.59),
c(188.13,-10.72))) |>
e_scatter(
serie = lat,
scale = NULL,
size = mag,
bind = label, #params.name
name = "地震点",
coord_system = "geo"
)|>
e_labels(
position = 'top',
formatter = htmlwidgets::JS("function(params){
return( params.name )}")
)