Closed cailuzhaixing closed 1 year ago
Try this.
url<-'https://echarts.apache.org/examples/data/asset/geo/Veins_Medical_Diagram_clip_art.svg'
svg_neizang<-url %>% readLines() %>% paste0(collapse = "")
df <- data.frame(name=c('heart','large-intestine','small-intestine','spleen','kidney','lung','liver'),value=c(121, 321, 141, 52, 198, 289, 139))
e <- df %>%
e_charts(name, elementId = "MYCHART") %>%
e_svg_register('svg', svg_neizang) %>%
e_geo(map='svg',left=10,right='50%',selectedMode='multiple', blur=FALSE, emphasis=list(focus='self',itemStyle=list(color=NULL))) %>%
e_grid(left='60%',top='20%',bottom='20%') %>%
e_bar(value,x_index=1,y_index=1) %>%
e_flip_coords() %>%
e_on(
list(seriesIndex=0),
"function (event) {
let c = get_e_charts('MYCHART');
c.dispatchAction({
type: 'highlight',
geoIndex: 0,
name: event.name
});
}",event='mouseover') %>%
e_on(list(seriesIndex=0),
"function (event) {
let c = get_e_charts('MYCHART');
c.dispatchAction({
type: 'downplay',
geoIndex: 0,
name: event.name
});
}",event='mouseout')
I want to realize an example of the official, address: example。
But the actual mouse slip bar chart, the figure of human body structure can not be normal, can help have a look at what's the problem?