# NOT RUN {
# scaling
e_scale(c(1, 1000))
mtcars %>%
e_charts(mpg) %>%
e_scatter(wt, qsec)
my_scale <- function(x) scales::rescale(x, to = c(2, 50))
echart <- mtcars %>%
e_charts(mpg) %>%
e_scatter(wt, qsec, scale = my_scale)
echart
# rescale color too
echart %>%
e_visual_map(wt, scale = my_scale)
# or
echart %>%
e_visual_map(min = 2, max = 50)
# applications
USArrests %>%
e_charts(Assault) %>%
e_scatter(Murder, Rape) %>%
e_effect_scatter(Rape, Murder, y_index = 1) %>%
e_grid(index = c(0, 1)) %>%
e_tooltip()
iris %>%
e_charts_("Sepal.Length") %>%
e_scatter_(
"Sepal.Width",
symbol_size = c(8, 2),
symbol = "rect"
) %>%
e_x_axis(min = 4)
quakes %>%
e_charts(long) %>%
e_geo(
roam = TRUE,
boundingCoords = list(
c(185, - 10),
c(165, -40)
)
) %>%
e_scatter(lat, mag, coord_system = "geo") %>%
e_visual_map(min = 4, max = 6.5)
# }
Run the code above in your browser using DataLab