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

双Y轴双bar图有负数的问题 #8747

Closed
kuky121 opened this Issue Jul 24, 2018 · 2 comments

Comments

Projects
None yet
4 participants
@kuky121
Copy link

kuky121 commented Jul 24, 2018

One-line summary [问题简述]

在双Y轴,并且两个图都是bar的情况下,如果第二个Y轴的数据有负数时,画出的柱子不是从0开始,而是从图形底部向上画。目前临时的解决方案是在第二个Y轴数据的series中加入一个stack,让其从0开始积累。使用echarts3没有此问题。

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: 4.1.0.rc2
  • Browser version [浏览器类型和版本]: chrome 67.0.3396.99(32位)
  • OS Version [操作系统类型和版本]:windows 10

Expected behaviour [期望结果]

ECharts option [ECharts配置项]

option = {
    xAxis : [
        {
            type : 'category',
            data : ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
            axisTick: {
                alignWithLabel: true
            }
        }
    ],
    yAxis : [
        {
            type : 'value'
        },
        {
            type : 'value'
        }
    ],
    series : [
        {
            yAxisIndex:0,
            name:'数据1',
            type:'bar',
            data:[10, -52]
        },
        {
            yAxisIndex:1,
            name:'数据2',
            type:'bar',
            data:[10, -52]
        }
    ]
}

Other comments [其他信息]

@sdtazhanghe

This comment has been minimized.

Copy link

sdtazhanghe commented Aug 3, 2018

遇到了相同的问题,请帮忙看一下

@Ovilia Ovilia self-assigned this Aug 14, 2018

@Ovilia

This comment has been minimized.

Copy link
Contributor

Ovilia commented Aug 27, 2018

经定位是 1da2473#diff-cd2cd80a0b7478193285daebf4d1fc4a 这个 commit 引起的 bug,逻辑有点复杂,辛苦 @100pah 看下~

@Ovilia Ovilia assigned 100pah and unassigned Ovilia Aug 27, 2018

@100pah 100pah closed this in 0a5282b Sep 3, 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.