-
-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support Animated Grouped Bubble Chart? #435
Comments
@XiangyunHuang (@JohnCoene) I think you can do this in echarts4r as well. No new features are needed I think. Given your examnple I was not entirely sure which output you intended, to be honest. So I made two possible animated, grouped bubbel charts. Pick the one you want :)
Did this help you? Good luck! If this was the disired outcome, then you can close the issue. |
@rdatasculptor Below is what I want. It is created by helgasoft using echarty. |
Is'nt that my second bubble chart? Also you can add a changing title, like this:
@XiangyunHuang if it is still not what wanted, can you point me at the differences? |
@rdatasculptor Thanks, your solution is good. Is there any other simpler method to reshape |
@XiangyunHuang Another way is using e.g. pivot_wider. by using pivot_wider:
Also you can play with symbol size, because that's where the main difference is with @helgasoft approach is I think. |
@XiangyunHuang playing with symbol size using scaling I mean:
|
Thanks! Just for myself, we can use Base R's library(echarts4r)
set.seed(2022)
dat <- data.frame(
x1 = rep(2020:2023, each = 4),
x2 = rep(c("A", "A", "B", "B"), 4),
x3 = runif(16),
x4 = runif(16),
x5 = abs(runif(16))
)
dat2 <- reshape(
data = dat,
varying = c("A", "B"),
timevar = c("x2"),
idvar = c("x1", "x3", "x4"),
direction = "wide"
)
dat2 |>
group_by(x1) |>
e_charts(x = x3, timeline = TRUE) |>
e_scatter(A, size = x4, symbol_size = 5) |>
e_scatter(B, size = x4, symbol_size = 5) |>
e_tooltip() |>
e_timeline_serie(
title = list(
list(text = "2020"),
list(text = "2021"),
list(text = "2022"),
list(text = "2023")
)
) |
I want to create an Animated Grouped Bubble Chart, but I don't know how to do that. This is my attempt
1. simulate some fake data
dat
2. try to create Animated Grouped Bubble Chart
I'm able to create Grouped Bubble Chart and Animated Bubble Chart.
But, I failed to create Animated Grouped Bubble Chart. when I add
x2
intogroup_by()
, Is there any other way to do that?Session info
Created on 2022-06-08 by the reprex package (v2.0.1)
The text was updated successfully, but these errors were encountered: