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

globalout not working #4169

Closed
vivaxy opened this issue Sep 29, 2016 · 0 comments
Closed

globalout not working #4169

vivaxy opened this issue Sep 29, 2016 · 0 comments

Comments

@vivaxy
Copy link

vivaxy commented Sep 29, 2016

问题描述

绑定的 globalout 回调没有执行

版本及环境 (Version & Environment)

  • ECharts 版本 (ECharts version): 3.2.3
  • 浏览器类型和版本 (Browser version): Chrome/53.0.2785.116
  • 操作系统类型和版本 (OS Version): Mac OS X 10_12_0

重现步骤 (Steps to reproduce)

  1. 用下方的 option,并且加上事件绑定
myChart.on('globalout', function (params) {
    console.log('globalout', params);
});

期望结果 (Expected behaviour)

控制台显示 globalout

可能哪里有问题 (What went wrong)

d.k.

ECharts配置项 (ECharts option)

option = {
    title: {
        text: '折线图堆叠'
    },
    tooltip: {
        trigger: 'axis',
        // alwaysShowContent: true,
        formatter: function (params, ticket, callback) {
            var index = params.map(function (pa) {
                return pa.dataIndex;
            })[0];
            console.log(params);
            return '提示框' + index;
        }
    },
    legend: {
        data: ['邮件营销', '联盟广告', '视频广告', '直接访问', '搜索引擎']
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis: {
        type: 'category',
        boundaryGap: false,
        data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
    },
    yAxis: {
        type: 'value'
    },
    series: [
        {
            name: '邮件营销',
            type: 'line',
            stack: '总量',
            data: [120, 132, 101, 134, 90, 230, 210],
            markLine: {

            }
        },
        {
            name: '联盟广告',
            type: 'line',
            stack: '总量',
            data: [220, 182, 191, 234, 290, 330, 310]
        },
        {
            name: '视频广告',
            type: 'line',
            stack: '总量',
            data: [150, 232, 201, 154, 190, 330, 410]
        },
        {
            name: '直接访问',
            type: 'line',
            stack: '总量',
            data: [320, 332, 301, 334, 390, 330, 320]
        },
        {
            name: '搜索引擎',
            type: 'line',
            stack: '总量',
            data: [820, 932, 901, 934, 1290, 1330, 1320]
        }
    ]
}

其他信息 (Other comments)

@100pah 100pah closed this as completed in 931191c Oct 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant