是否有类似于echarts4r ( d3heatmap )的缩放热图的方法?(https://github.com/rstudio/d3heatmap)。其目的是使用echarts4r中的回调来触发d3heatmap (据我所知)在热图上单击和悬停时发生的事件。
此代码是从(https://echarts4r.john-coene.com/articles/chart_types.html#heatmap)中复制的,并添加了画笔。画笔显示并可以选择缩放窗口,但是图表不会缩放。
v <- LETTERS[1:10]
matrix <- data.frame(
x = sample(v, 300, replace = TRUE),
y = sample(v, 300, replace = TRUE),
z = rnorm(300, 10, 1),
stringsAsFactors = FALSE
) %>%
dplyr::group_by(x, y) %>%
dplyr::summarise(z = sum(z)) %>%
dplyr::ungroup()
matrix %>%
e_charts(x) %>%
e_heatmap(y, z) %>%
e_visual_map(z) %>%
e_title("Heatmap") %>%
e_brush() # add the brush发布于 2020-02-24 15:35:02
在echarts中,刷子和缩放是两种不同的东西:使用e_datazoom代替。
v <- LETTERS[1:10]
matrix <- data.frame(
x = sample(v, 300, replace = TRUE),
y = sample(v, 300, replace = TRUE),
z = rnorm(300, 10, 1),
stringsAsFactors = FALSE
) %>%
dplyr::group_by(x, y) %>%
dplyr::summarise(z = sum(z)) %>%
dplyr::ungroup()
matrix %>%
e_charts(x) %>%
e_heatmap(y, z) %>%
e_visual_map(z) %>%
e_title("Heatmap") %>%
e_datazoom() # use zoomhttps://stackoverflow.com/questions/59655677
复制相似问题