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轴设置了min之后,柱形图如果有负数,显示有问题 #5069

Closed
fsx379 opened this Issue Feb 14, 2017 · 6 comments

Comments

Projects
None yet
6 participants
@fsx379

fsx379 commented Feb 14, 2017

One-line summary [问题简述]

双轴,
左边轴,用于显示柱状图,其中数据有负数;
右边轴显示其他数据。由于右边轴显示数据波动范围小,故需要设置min、max。

如果min设置为 0或负数,左轴的柱状图显示没问题;
如果min设置为正数,左轴的柱状图显示有问题,不是从0开始的,而是从最下方开始。详细见代码;

Version & Environment [版本及环境]

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

Expected behaviour [期望结果]

即使设置了min,柱状图也能正常显示(从0开始显示)

ECharts option [ECharts配置项]

option = {
color: ['#3398DB'],
    xAxis : [
        {
            type : 'category',
            data : ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
        }
    ],
    yAxis : [
        {
            type : 'value'
        },
        {
            type: 'value',
            axisLabel: {
                formatter: '{value} %'
            },
            min: 0, max: 80
        }
    ],
    series : [
        {
            name:'直接访问',
            type:'bar',
            // barWidth: '60%',
            data:[1000, -520, -2000, -3340, 3900, -330, -5220]
        }
    ]
}

Other comments [其他信息]

正确的:
image

有问题的:
image

@pissang pissang added the bug label Feb 14, 2017

@johnhuang669

This comment has been minimized.

Show comment
Hide comment
@johnhuang669

johnhuang669 Mar 16, 2017

請問這個bug甚麼時候可以修正??已經過很久了 而且是很常發生的bug

johnhuang669 commented Mar 16, 2017

請問這個bug甚麼時候可以修正??已經過很久了 而且是很常發生的bug

@johnhuang669

This comment has been minimized.

Show comment
Hide comment
@johnhuang669

johnhuang669 Apr 17, 2017

請問有看到嗎???

johnhuang669 commented Apr 17, 2017

請問有看到嗎???

@chisuru

This comment has been minimized.

Show comment
Hide comment
@chisuru

chisuru Jul 6, 2017

这个问题我也碰到了, 3.5.4版还有这个问题
看起来像是设定双轴的时候, 0以下的柱状图没有弄成相反顯示.
例如第1, 第5根0以下是全满的柱状图, 把它消掉 就正常了
其它根柱状图 把0以下 没图的部份画上正常的柱状图, 有图的部份 消掉 也正常了

chisuru commented Jul 6, 2017

这个问题我也碰到了, 3.5.4版还有这个问题
看起来像是设定双轴的时候, 0以下的柱状图没有弄成相反顯示.
例如第1, 第5根0以下是全满的柱状图, 把它消掉 就正常了
其它根柱状图 把0以下 没图的部份画上正常的柱状图, 有图的部份 消掉 也正常了

@jsiwa

This comment has been minimized.

Show comment
Hide comment
@jsiwa

jsiwa commented Jul 14, 2017

@100pah

This comment has been minimized.

Show comment
Hide comment
@100pah

100pah Jul 15, 2017

Member

在当前版本 3.6.x 看起来已经没有这个问题了。

Member

100pah commented Jul 15, 2017

在当前版本 3.6.x 看起来已经没有这个问题了。

@100pah 100pah closed this Jul 15, 2017

@chisuru

This comment has been minimized.

Show comment
Hide comment
@chisuru

chisuru Jul 17, 2017

chisuru commented Jul 17, 2017

@100pah 100pah reopened this Jul 17, 2017

@100pah 100pah closed this in 1064b3f Jul 18, 2017

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