Skip to content
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

官网demo中设置 dispatchAction showTip 无效 #9156

Closed
maningbo opened this issue Sep 30, 2018 · 6 comments

Comments

5 participants
@maningbo
Copy link

commented Sep 30, 2018

One-line summary [问题简述]

官网demo中设置 dispatchAction showTip 无效
http://www.echartsjs.com/examples/editor.html?c=map-china

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:
  • Browser version [浏览器类型和版本]:
  • OS Version [操作系统类型和版本]:

Expected behaviour [期望结果]

dispatchAction showTip 可以正常控制浮窗展示

ECharts option [ECharts配置项]

option = {
    tooltip: {
        trigger: 'item',
        formatter: '{b}'
    },
    series: [
        {
            name: '中国',
            type: 'map',
            mapType: 'china',
            selectedMode : 'multiple',
            label: {
                normal: {
                    show: true
                },
                emphasis: {
                    show: true
                }
            },
            data:[
                {name:'广东', selected:false},
                {name:'北京', selected:false}
            ]
        }
    ]
};
myChart.dispatchAction({ //生效
    type:'mapSelect',
    //dataIndex: 1,
    name: '北京',
    seriesIndex: 0,
});
myChart.dispatchAction({ //不生效
    type:'showTip',
    //dataIndex: 1,
    name: '北京',
    seriesIndex: 0,
});

Other comments [其他信息]

@maningbo

This comment has been minimized.

Copy link
Author

commented Sep 30, 2018

应该是这个在线的编辑器有问题
同样的代码
这里可以正常出来
http://gallery.echartsjs.com/editor.html?c=x5j3XJANHP
这里连个图都没有
http://gallery.echartsjs.com/editor.html?c=x19Dhdosyo
大家还是下载后本地调试靠谱

@Ovilia

This comment has been minimized.

Copy link
Contributor

commented Oct 8, 2018

@maningbo 点“脚本”可以看到后面那个没有引入地图 js。

@Ovilia Ovilia added the pending label Oct 8, 2018

@maningbo

This comment has been minimized.

Copy link
Author

commented Oct 9, 2018

@Ovilia 嗯,第一次用这个,不太熟悉用法。加入后地图出来了,但是浮窗依然不会自动展示
可以正常自动展示浮窗
http://gallery.echartsjs.com/editor.html?c=x5j3XJANHP
有地区但是不可以自动展示浮窗
http://gallery.echartsjs.com/editor.html?c=x19Dhdosyo

@hl-stone

This comment has been minimized.

Copy link

commented Oct 17, 2018

自己制作的geojson 数据地图,新增地区,不能showTip,在3.3.0版本上面可以,4.0.4、4.2.0 版本都不能显示!

@Ovilia

This comment has been minimized.

Copy link
Contributor

commented Oct 17, 2018

@maningbo 这两个例子 ECharts 的版本不同,前者是 http://gallerybox.echartsjs.com/dep/echarts/3.8.0/echarts.min.js 后者是 http://gallerybox.echartsjs.com/dep/echarts/latest/echarts.min.js 4.0.5 版本的。看起来是个 bug。

@Ovilia Ovilia added bug and removed pending labels Oct 17, 2018

@Ovilia Ovilia added this to Bugs in Issues for Beginners Oct 17, 2018

@liang520

This comment has been minimized.

Copy link

commented Oct 26, 2018

我也有同样的问题,echarts是 4.2.0的,地图showTip不生效,mapSelected都可以生效

@Ovilia Ovilia added the map label Oct 26, 2018

@Ovilia Ovilia self-assigned this Oct 26, 2018

@100pah 100pah closed this in 772225d Oct 29, 2018

100pah added a commit that referenced this issue Oct 29, 2018

Merge pull request #9295 from devyumao/master
fix: #9156 correct map showTip

@Ovilia Ovilia moved this from Bugs to Accepted in Issues for Beginners Oct 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.