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

Stacked Bar with dataZoom regression (4.1.0) #8935

Closed
warrenspe opened this issue Aug 23, 2018 · 6 comments
Closed

Stacked Bar with dataZoom regression (4.1.0) #8935

warrenspe opened this issue Aug 23, 2018 · 6 comments
Assignees
Labels
bug en This issue is in English priority: high
Milestone

Comments

@warrenspe
Copy link

One-line summary [问题简述]

stacked bar charts exceed zoom limit in 4.1.0

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: 4.1.0
  • Browser version [浏览器类型和版本]: Firefox 62.0b17
  • OS Version [操作系统类型和版本]: Windows 10

Expected behaviour [期望结果]

See this fiddle, loading echarts 3.2.2
Expected (3.2.2): http://jsfiddle.net/cj31rtpf/1208/
Actual (4.1.0): http://jsfiddle.net/cj31rtpf/1209/

ECharts option [ECharts配置项]

option = {
    title: {
        text: '世界人口总量',
        subtext: '数据来自网络'
    },
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'shadow'
        }
    },
    legend: {
        data: ['2011年', '2012年']
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    yAxis: {
        type: 'value',
        boundaryGap: [0, 0.01]
    },
    xAxis: {
        type: 'category',
        data: ['巴西','印尼','美国','印度','中国','世界人口(万)']
    },
    dataZoom: [
        {
            "type": "slider",
            "xAxisIndex": 0,
            "backgroundColor": "rgba(255,255,255,0)",
            "fillerColor": "rgba(255,255,255,0.4)",
            "zoomOnMouseWheel": false,
            "showDetail": false
        },
        {
            "type": "slider",
            "yAxisIndex": 0,
            "zoomOnMouseWheel": false,
            "showDetail": false
        }
    ],
    series: [
        {
            name: '2011年',
            type: 'bar',
            stack: 'overall',
            data: [18203, 23489, 29034, 104970, 131744, 630230]
        },
        {
            name: '2012年',
            type: 'bar',
            stack: 'overall',
            data: [19325, 23438, 31000, 121594, 134141, 681807]
        }
    ]
};

Other comments [其他信息]

See this fiddle, loading echarts 3.2.2
Expected (3.2.2): http://jsfiddle.net/cj31rtpf/1208/
Actual (4.1.0): http://jsfiddle.net/cj31rtpf/1209/

@Ovilia
Copy link
Contributor

Ovilia commented Aug 30, 2018

目前定位到问题是在 2fddc7f 这个 commit 中引起的

@Ovilia Ovilia added FAQ and removed priority: high labels Sep 3, 2018
@jarben
Copy link
Contributor

jarben commented Sep 5, 2018

Perhaps another instance of this bug:
image
Code:


myChart.showLoading();

$.get('data/asset/data/obama_budget_proposal_2012.list.json', function (obama_budget_2012) {
    myChart.hideLoading();

    option = {
        tooltip : {
            trigger: 'axis',
            axisPointer: {
                type: 'shadow',
                label: {
                    show: true
                }
            }
        },
        toolbox: {
            show : true,
            feature : {
                mark : {show: true},
                dataView : {show: true, readOnly: false},
                magicType: {show: true, type: ['line', 'bar']},
                restore : {show: true},
                saveAsImage : {show: true}
            }
        },
        calculable : true,
        legend: {
            data:['Growth', 'Budget 2011', 'Budget 2012'],
            itemGap: 5
        },
        grid: {
            top: '12%',
            left: '1%',
            right: '10%',
            containLabel: true
        },
        yAxis: [
            {
                type : 'category',
                data : obama_budget_2012.names
            }
        ],
        xAxis: [
            {
                type : 'value',
                name : 'Budget (million USD)',
                axisLabel: {
                    formatter: function (a) {
                        a = +a;
                        return isFinite(a)
                            ? echarts.format.addCommas(+a / 1000)
                            : '';
                    }
                }
            }
        ],
        dataZoom: [
            {
                show: true,
                start: 5,
                end: 20
            },
            {
                type: 'inside',
                start: 0,
                end: 10
            },
            {
                show: true,
                yAxisIndex: 0,
                filterMode: 'empty',
                start:90,
                end:100,
                width: 30,
                height: '80%',
                showDataShadow: false,
                left: '93%'
            }
        ],
        series : [
            {
                name: 'Budget 2011',
                type: 'bar',
                stack:true,
                data: obama_budget_2012.budget2011List
            },
            {
                name: 'Budget 2012',
                stack:true,
                type: 'bar',
                data: obama_budget_2012.budget2012List
            }
        ]
    };

    myChart.setOption(option);

});

@jarben
Copy link
Contributor

jarben commented Sep 10, 2018

Any thoughts around when this is going to be fixed & released @Ovilia ?

@Ovilia
Copy link
Contributor

Ovilia commented Oct 12, 2018

@100pah says that dataZoom of stacked bars were not supported yet but somehow it worked before. He will fix it later.

@jarben
Copy link
Contributor

jarben commented Oct 12, 2018

Thanks for looking at this @Ovilia !

@15531400827
Copy link

@Ovilia 问一下问题还不能解决吗? 问题都抛出半年了把。。。。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug en This issue is in English priority: high
Projects
None yet
Development

No branches or pull requests

6 participants