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

折线图进行缩放的时候,Y轴与鼠标所在当前点反向了 #5278

Closed
haoyi211 opened this Issue Mar 15, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@haoyi211

haoyi211 commented Mar 15, 2017

One-line summary [问题简述]

当对折线图进行缩放的时候,Y轴与鼠标所在当前点是反的,x轴是正常的,官网上的样例同样存在此问题
例如:当鼠标挪在折线图右上角进行缩放时,应当对右上角区域进行放大,而目前却是对右下角进行缩放

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:3.4.0
  • Browser version [浏览器类型和版本]:Opera 43.0
  • OS Version [操作系统类型和版本]:Windows 10 64位

Expected behaviour [期望结果]

当鼠标挪在右上角进行缩放,应当对右上角区域进行放大,而不是右下角

ECharts option [ECharts配置项]

option = {
    title: {
        text: '折线图堆叠'
    },
    tooltip: {
        trigger: 'axis'
    },
    legend: {
        data:['邮件营销','联盟广告','视频广告','直接访问','搜索引擎']
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    toolbox: {
        feature: {
            saveAsImage: {}
        }
    },
    xAxis: {
        type: 'category',
        boundaryGap: false,
        data: ['周一','周二','周三','周四','周五','周六','周日']
    },
    yAxis: {
        type: 'value'
    },
     dataZoom: [
                        {
                            type: 'slider',
                            xAxisIndex: 0,
                            filterMode: 'empty'
                        },
                        {
                            type: 'slider',
                            yAxisIndex: 0,
                            filterMode: 'empty'
                        },
                        {
                            type: 'inside',
                            xAxisIndex: 0,
                            filterMode: 'empty'
                        },
                        {
                            type: 'inside',
                            yAxisIndex: 0,
                            filterMode: 'empty'
                        }
                    ],
    series: [
        {
            name:'邮件营销',
            type:'line',
            stack: '总量',
            data:[120, 132, 101, 134, 90, 230, 210]
        },
        {
            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 [其他信息]

@pissang

This comment has been minimized.

Show comment
Hide comment
@pissang

pissang Mar 15, 2017

Contributor

没什么问题啊

Contributor

pissang commented Mar 15, 2017

没什么问题啊

@haoyi211

This comment has been minimized.

Show comment
Hide comment
@haoyi211

haoyi211 May 25, 2017

我是指,比如,当鼠标放到右上角,进行缩放,应当是对右上角区域进行放大,但是现在在右上角进行放大的时候,放大的是右下角(使用滚轮操作)。

haoyi211 commented May 25, 2017

我是指,比如,当鼠标放到右上角,进行缩放,应当是对右上角区域进行放大,但是现在在右上角进行放大的时候,放大的是右下角(使用滚轮操作)。

@haoyi211

This comment has been minimized.

Show comment
Hide comment

@pissang pissang added the enhancement label Jun 13, 2017

@100pah 100pah closed this in d061086 Jun 13, 2017

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