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

设置 barGap 为 '-100%',用柱子做背景的时候出现BUG #6312

Closed
bltbbb opened this issue Jul 29, 2017 · 0 comments
Closed

设置 barGap 为 '-100%',用柱子做背景的时候出现BUG #6312

bltbbb opened this issue Jul 29, 2017 · 0 comments

Comments

@bltbbb
Copy link

bltbbb commented Jul 29, 2017

One-line summary [问题简述]

设置 barGap 为 '-100%,用柱子做背景的时候,缩放窗口到较小宽度时,背景柱子宽度不会变窄,而上面一层的柱子会变窄,因此造成前柱子与后柱子宽度不等,露出背景

Version & Environment [版本及环境]

  • ECharts version [3.6.2]:
  • Browser version [chrome 56]:
  • OS Version [win10]

Expected behaviour [期望结果]

缩放窗口到较小宽度时,背景柱子随窗口变化,保持和前柱子一样的宽度

ECharts option [ECharts配置项]

option = {
    xAxis: {
        data: ['a', 'b', 'c', 'd'],
        axisTick: {show: false},
        axisLabel: {
            formatter: 'barGap: \'-100%\''
        }
    },
    yAxis: {
        show: false,
            splitLine: {show: false},
            axisLabel: {
              formatter:'{value}',
              margin: 20
            },
            axisTick: {show: false}
    },
   
    series: [{
        type: 'bar',
        itemStyle: {
            normal: {
                color: '#ddd'
            }
        },
        silent: true,
        barWidth: 40,
        barGap: '-100%', // Make series be overlap
        data: [60, 60, 60, 60]
    }, {
        type: 'bar',
        barWidth: 40,
        z: 10,
        data: [45, 60, 13, 25]
    }]
};

Other comments [其他信息]

http://echarts.baidu.com/gallery/editor.html?c=doc-example/barGrid-barGap

ps:打开开发者工具,向左拉动窗口直至左边代码框消失继续拉动即可看到效果。

@100pah 100pah closed this as completed in d738909 Jul 30, 2017
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