JohnCoene / echarts4r

🐳 ECharts 5 for R
http://echarts4r.john-coene.com/
Other
599 stars 81 forks source link

When switch between timeline , echart map randomly highlight a country, which is weird. #400

Closed brucefeiwang closed 2 years ago

brucefeiwang commented 2 years ago

When switch between timeline , map randomly highlight a country, which is weird.

library(gapminder)

datos_gapminder_map <- gapminder %>%
  mutate(Name = recode_factor(country,
                              `Congo, Dem. Rep.`= "Dem. Rep. Congo",
                              `Congo, Rep.`= "Congo",
                              `Cote d'Ivoire`= "Côte d'Ivoire",
                              `Central African Republic`= "Central African Rep.",
                              `Yemen, Rep.`= "Yemen",
                              `Korea, Rep.`= "Korea",
                              `Korea, Dem. Rep.`= "Dem. Rep. Korea",
                              `Czech Republic`= "Czech Rep.",
                              `Slovak Republic`= "Slovakia",
                              `Dominican Republic`= "Dominican Rep.",
                              `Equatorial Guinea`= "Eq. Guinea"))

datos_gapminder_map %>%
  group_by(year) %>%
  e_chart(Name, timeline = TRUE) %>%
  e_map(lifeExp) %>%
  e_visual_map(min= 30, max= 90,
               type = 'piecewise') %>%
  e_title("Life expectancy by country and year", left = "center") %>%
  e_tooltip(
    trigger = "item",
    formatter = e_tooltip_choro_formatter())

temp

JohnCoene commented 2 years ago

Which version of echarts4r do you have?

I believe this issue was reported and fix; I cannot reproduce it on the latest CRAN or dev version.

brucefeiwang commented 2 years ago

R version 4.1.2 (2021-11-01) temp

Could it be a problem with Windows only ? temp

JohnCoene commented 2 years ago

Strange this.

Could you reinstall from CRAN now, restart the R session and open the visualisation in your web browser?

brucefeiwang commented 2 years ago

tried this , did not work remotes::install_github("JohnCoene/echarts4r")

If you click auto play button, it is ok. it only happens when you manually click different years.

helgasoft commented 2 years ago

same as #272, still not fixed in ECharts v.5.2.2

brucefeiwang commented 2 years ago

I see. thanks