Display variable names when hovering a scatter plot

Here’s a plot made with {echarts4r} that comes from this answer on GitHub: library(echarts4r) library(tibble) mtcars %>% rownames_to_column(“model”) %>% e_charts(mpg) %>% …

Echarts.js: Detect a click on a subset of data

I want to detect a click on a particular subset in a bar chart. As I want to init a new chart after the click, with the data from the clicked subset. Currently when I click on chart bars, I get data of the whole chart and can’t retrieve data of just one bar. Here is what I have: Answer I managed to detect the clicked subset by adding a refs attribute and the click event to the component and passing a function. Then I put this function in methods: