查看echarts api -----   https://www.echartsjs.com/zh/api.html#echarts

搜索

1.dispatchAction   执行的关键

2.highlight    变换显示的关键

3.tooltip   变幻时 显示提示框的关键

关键代码:

1. myChartSalarypie.setOption({});   设置自己的的option 内容

2. myChartSalarypie.dispatchAction({type: 'downplay',seriesIndex: 0,dataIndex: curIndex});

3.myChartSalarypie.dispatchAction({type: 'highlight',seriesIndex: 0,dataIndex: curIndex});

4.myChartSalarypie.dispatchAction({
                                        type:'showTip',
                                        seriesIndex:0,
                                        dataIndex:curIndex
                                    });

跳动的完整代码:

if( runFlag !=null )
                                  {
                                       clearInterval(runFlag);
                                       runFlag = null ;
                                  }
                       if(curIndex == null) {
                           myChartSalarypie.dispatchAction({type: 'highlight',seriesIndex: 0,dataIndex: 0});
                        }
                        else {
                            myChartSalarypie.dispatchAction({type: 'highlight',seriesIndex: 0,dataIndex: curIndex});
                            myChartSalarypie.dispatchAction({
                                        type:'showTip',
                                        seriesIndex:0,
                                        dataIndex:curIndex
                                    });
                             
                               runFlag = setInterval(function () {
                                    var dataLen = showDate.length;
                                    // 取消高亮
                                    myChartSalarypie.dispatchAction({type: 'downplay',seriesIndex: 0,dataIndex: curIndex});
                                    curIndex = (curIndex + 1) % dataLen;
                                    //设置高亮
                                    myChartSalarypie.dispatchAction({type: 'highlight',seriesIndex: 0,dataIndex: curIndex});
                                    myChartSalarypie.dispatchAction({
                                        type:'showTip',
                                        seriesIndex:0,
                                        dataIndex:curIndex
                                    });
                                }, 3000);
                                }
                       openRunFlag=false;

最新文章

  1. paramiko 的使用
  2. EXCEL里面的数字显示为文本 不用科学计数法显示
  3. ul li 下的元素内容垂直居中
  4. jQuery对话框插件 ThickBox
  5. JQuery初探
  6. Enum:Backward Digit Sums(POJ 3187)
  7. 【转】SSM框架——详细整合教程(Spring+SpringMVC+MyBatis)
  8. 从Windows 8 安装光盘安装.NET Framework 3.5.1
  9. 我的Blog开张啦,欢迎大家赏脸
  10. MVC 构造
  11. Android init进程概述
  12. JS时间的计算,当前日期加一天或者几天的计算
  13. 【C#基础】HTTP发送POST二进制数据
  14. 深圳尚学堂:Java中Class对象
  15. JDK配置测试
  16. LEDAPS1.3.0版本移植到windows平台----HuSr大气校正模块
  17. Laravel 系列入门教程(五)【最适合中国人的 Laravel 教程】
  18. [转帖]数据中心网络里的Underlay和Overlay
  19. Python爬虫实战(一):爬糗事百科段子
  20. 对微软Microsoft Dynamics CRM 的认识

热门文章

  1. Mysql-Mybatis常用动态Sql语句
  2. 【解决】Mac无法通过smb连接到windows的共享文件夹
  3. Go--生成excel表格,读取excel表格数据
  4. mybatis-plus主键生成策略(实体类配置,数据库插入数据自动生成id)
  5. python3.7安装Anaconda3+tensorflow2.1中遇到的问题
  6. Antlr语法优化过程记录
  7. Mac 安装nvm
  8. 为什么要有jvm,jvm的作用?
  9. 【Python】Python 技巧集锦(长期更新)
  10. kali中MulVAL的安装与配置