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

Zoom on bar charts with stacked value #7672

Closed
JimiJones opened this issue Jan 30, 2018 · 0 comments
Closed

Zoom on bar charts with stacked value #7672

JimiJones opened this issue Jan 30, 2018 · 0 comments

Comments

@JimiJones
Copy link

One-line summary [问题简述]

I would like to be able to zoom on bar charts with stacked value. Now when I change the zoom, it remove the stack and display all the bar of the same x index one over the others.

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: 4.0.2
  • Browser version [浏览器类型和版本]: Chrome Version 64.0.3282.119 (Build officiel) (64 bits)
  • OS Version [操作系统类型和版本]: Windows 10 Home (64 bits)

Expected behaviour [期望结果]

Bar with value stacked

ECharts option [ECharts配置项]

option = {
    tooltip : {
        trigger: 'axis',
        axisPointer : {            // 坐标轴指示器,坐标轴触发有效
            type : 'shadow'        // 默认为直线,可选为:'line' | 'shadow'
        }
    },
    legend: {
        data:['直接访问','邮件营销','联盟广告','视频广告','搜索引擎','百度','谷歌','必应','其他']
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis : [
        {
            type : 'category',
            data : ['周一','周二','周三','周四','周五','周六','周日']
        }
    ],
    yAxis : [
        {
            type : 'value'
        }
    ],
    series : [
        {
            name:'邮件营销',
            type:'bar',
            stack: '广告',
            data:[120, 132, 101, 134, 90, 230, 210]
        },
        {
            name:'联盟广告',
            type:'bar',
            stack: '广告',
            data:[220, 182, 191, 234, 290, 330, 310]
        },
        {
            name:'视频广告',
            type:'bar',
            stack: '广告',
            data:[150, 232, 201, 154, 190, 330, 410]
        },
    ],dataZoom: [
            {
                show: true,
                filterMode: 'filter',
            }
        ]
};

Other comments [其他信息]

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

No branches or pull requests

2 participants