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)} />
效果图

hideTip 隐藏提示框
dispatchAction({
type:'hideTip'
})
网友评论