New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dispatchAction showTip is not working with version 3.5.1 #5423

Closed
z827101859 opened this Issue Apr 1, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@z827101859

One-line summary [问题简述]

echarts3.5版本,dispatchAction方法,参数type为showTip时不能显示tooltip。
在echarts3.4版本中正常。
参见:https://codepen.io/sweetyx/pen/ryPamX

Version & Environment [版本及环境]

  • ECharts version [3.5.1]:
  • Browser version [chorme lastest]:
  • OS Version [windows7]:

Expected behaviour [期望结果]

ECharts option [ECharts配置项]

var myChart = echarts.init(document.getElementById('main'));
        option = {
            title : {
                text: '未来一周气温变化',
            },
            tooltip: {
                trigger: 'axis'
            },
            xAxis : [
                {
                    type : 'category',
                    boundaryGap : false,
                    data : ['周一','周二','周三','周四','周五','周六','周日']
                }
            ],
            yAxis : [
                {
                    type : 'value'
                }
            ],
            series : [
                {
                    name:'xxx',
                    type:'line',
                    smooth:0.2,
                    data:[11, 11, 11, 5, 12, 13, 10]
                }
                ,{
                    name:'yyy',
                    type:'line',
                    smooth:0.2,
                    data:[13, 9, 2, 1, 5, 6, 7]
                }
            ]
        };
        myChart.setOption(option);
        myChart.dispatchAction({
            type: 'showTip',
            dataIndex: 1
        });

@100pah 100pah closed this in 296d071 Apr 4, 2017

@TrassonBoss

This comment has been minimized.

Show comment
Hide comment
@TrassonBoss

TrassonBoss Apr 9, 2017

升级到了3.5.2,还是不行:
两个echarts,mainChart的ToolTip触发otherChart的ToolTip,完全没反应。

function onshowTip(params) {
if (typeof params.dataIndex === 'undefined')
{
return;
}
   otherChart.dispatchAction({
type: 'showTip',
dataIndex: params.dataIndex+1
});
}
mainChart.on('showTip', onshowTip);

两个chart的范围不同,还可以怎么玩?

升级到了3.5.2,还是不行:
两个echarts,mainChart的ToolTip触发otherChart的ToolTip,完全没反应。

function onshowTip(params) {
if (typeof params.dataIndex === 'undefined')
{
return;
}
   otherChart.dispatchAction({
type: 'showTip',
dataIndex: params.dataIndex+1
});
}
mainChart.on('showTip', onshowTip);

两个chart的范围不同,还可以怎么玩?

@duxinxiao

This comment has been minimized.

Show comment
Hide comment
@duxinxiao

duxinxiao Apr 10, 2017

3.5.2 still have this bug

3.5.2 still have this bug

@linzhi

This comment has been minimized.

Show comment
Hide comment
@linzhi

linzhi Aug 10, 2018

我也遇到了这个问题 4.1.0 找不到dispatchAction这个方法

linzhi commented Aug 10, 2018

我也遇到了这个问题 4.1.0 找不到dispatchAction这个方法

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment