美文网首页
echarts 常用API action 之 disp

echarts 常用API action 之 disp

作者: 家有饿犬和聋猫 | 来源:发表于2020-03-05 13:51 被阅读0次

echarts中支持的图表行为,通过dispatchAction触发。
特定位置高亮或者显示提示框

 getChartObjs = (echartObj)=> {
        let {selectData: {seriesName}, type} = this.state;
        toolTipTimer = setTimeout(()=>{
            echartObj.dispatchAction({
                type: 'showTip',         //提示框
                seriesIndex: 0,
                dataIndex: lightIndex     //第 lightIndex   柱子高亮
            });}
        }, 300);
   
 <BBDLineBar option={barOption} key={key} lightIndex={lightIndex} getChartObj={this.getChartObjs.bind(this)} />
效果图 image.png

hideTip 隐藏提示框

dispatchAction({
type:'hideTip'
})

更多功能 https://www.cnblogs.com/sminocence/p/11230730.html

相关文章

网友评论

      本文标题:echarts 常用API action 之 disp

      本文链接:https://www.haomeiwen.com/subject/hiutrhtx.html