Hi! Thanks for this great package :)
I'm running into a strange issue where the x-axis max is doubled (?) when I'm adding two e_bar()s that are stacked. I want to create a bar chart where one bar is "highlighted", so I'm accomplishing that with two series.
The x limits in the data are the same, and they each appear separately just fine:
library(echarts4r)
library(dplyr)
df_1 <- data.frame(
x = 1:5,
y_1 = c(1, 2, 3, NA, 5)
)
df_1 %>%
e_chart(x) %>%
e_bar(y_1)

df_2 <- data.frame(
x = 1:5,
y_2 = c(NA, NA, NA, 4, NA)
)
df_2 %>%
e_chart(x) %>%
e_bar(y_2)

When I combine, the styling looks as desired - I'm "fake" stacking them I guess, because I don't want the dodged behaviour, and that looks fine - but the x-axis max is doubled, going all the way to 10 instead of 5:
df_combined <- df_1 %>%
left_join(df_2, by = "x")
df_combined %>%
e_chart(x) %>%
e_bar(y_1, stack = "group") %>%
e_bar(y_2, stack = "group")

Any ideas why this might be? I'm using the latest version from github. I know you can manually set the limits, but it's hard to do that on a dynamic / not-manual basis. Thank you!
Hi! Thanks for this great package :)
I'm running into a strange issue where the x-axis max is doubled (?) when I'm adding two
e_bar()s that are stacked. I want to create a bar chart where one bar is "highlighted", so I'm accomplishing that with two series.The x limits in the data are the same, and they each appear separately just fine:
When I combine, the styling looks as desired - I'm "fake" stacking them I guess, because I don't want the dodged behaviour, and that looks fine - but the x-axis max is doubled, going all the way to 10 instead of 5:
Any ideas why this might be? I'm using the latest version from github. I know you can manually set the limits, but it's hard to do that on a dynamic / not-manual basis. Thank you!