Home  >  Article  >  Web Front-end  >  Add click event to echarts pie chart sector - Fannn

Add click event to echarts pie chart sector - Fannn

一个新手
一个新手Original
2017-10-16 09:22:063091browse

Just add this code at the end of echarts

function eConsole(param) {
             //alert(option.series[0].data.length);              
             //alert(option.series[0].data[i]);  
             //param.dataIndex 获取当前点击索引,              
             //alert(param.dataIndex);  
             clickFunc(param.dataIndex);//执行点击效果        
}
myChart.on("click", eConsole);

The above is the detailed content of Add click event to echarts pie chart sector - Fannn. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn