Home>Article>Web Front-end> echarts implements the adding click event of the pie chart sector statistics table

echarts implements the adding click event of the pie chart sector statistics table

php中世界最好的语言
php中世界最好的语言 Original
2018-04-17 14:28:56 3793browse

This time I will bring you echarts to implement the pie chart sector statistics table to add click eventsEvents, echarts to implement the pie chart sector statistics table to add click eventsWhat are the precautions, the following is a practical case, let’s take a look.

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);

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the PHP Chinese website !

Recommended reading:

Use requireJS to add the return to top function

Node.js injects a large amount of data into MySQL

The above is the detailed content of echarts implements the adding click event of the pie chart sector statistics table. 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