Как я могу установить событие выделения по умолчанию в p ie echart? - PullRequest
0 голосов
/ 27 мая 2020

Я установил событие выделения по умолчанию в p ie электронных диаграмм, но когда я наводил курсор мыши на легенду, которая не соответствовала метке по умолчанию, она перекрывалась. Как я могу решить эту проблему?

Код события по умолчанию показан ниже:

devicebydis.dispatchAction({ type: 'highlight', seriesIndex: 0, dataIndex: 0 });  
devicebydis.dispatchAction({ type: 'highlight', seriesIndex: 1, dataIndex: 0 });    
devicebydis.dispatchAction({ type: 'highlight', seriesIndex: 2, dataIndex: 0 });

devicebydis.on('mouseover', function (v) {
    if (v.dataIndex != 0) {
        devicebydis.dispatchAction({
            type: 'downplay',
            seriesIndex: v.seriesIndex,
            dataIndex: 0
        });
    }
    devicebydis.dispatchAction({ type: 'pieselected', seriesId: ''})
});

devicebydis.on('mouseout', function(v) {
        devicebydis.dispatchAction({ type: 'highlight', seriesIndex: v.seriesIndex, dataIndex: 0 });
});

...