Closed MuslemRahimi closed 6 months ago
This issue is related. Unfortunately I am currently not able to implement something more robust. But I left a comment which should help you in accessing the rest of the ECharts API.
implemented in v1.0.0-rc1
how can I implement a click on a element, I cannot figure out
I ended up adding an on:click
attribute to determine which bar was clicked:
<Chart {init} {options} on:click={handleBarClick} />
function handleBarClick(params: any) {
console.log(params.detail.name);
}
Hi,
I have a simple bar chart where i want to add a click event when the user clicks on one of the bars.
For example it should for now print "console.log('click received')".
Do you know a simple way to do this?