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

极坐标系下的柱状图 #9626

Closed
mm007008009 opened this issue Dec 21, 2018 · 7 comments · Fixed by OpenTMI/opentmi-default-gui#32 or DeviaVir/zenbot#2011 · May be fixed by dyna-dot/iClient-JavaScript-s#1
Closed

极坐标系下的柱状图 #9626

mm007008009 opened this issue Dec 21, 2018 · 7 comments · Fixed by OpenTMI/opentmi-default-gui#32 or DeviaVir/zenbot#2011 · May be fixed by dyna-dot/iClient-JavaScript-s#1
Assignees
Milestone

Comments

@mm007008009
Copy link

mm007008009 commented Dec 21, 2018

我尝试了多个极坐标下的柱状图,发现,barWidth会被均分。

查询和尝试了多种避免均分的方法,仍然无法避免。

请确认这是否是bug,感谢!!!

图片:

polar

示例代码:

option = {
    angleAxis: [{
        type: 'category',
        data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
        z: 11,
        polarIndex:0,
        boundaryGap :true,
    },{
        type: 'category',
        data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
        z: 10,
        polarIndex:1
    },{
        type: 'category',
        data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
        z: 9,
        polarIndex:2
    }],
    radiusAxis: [{
        polarIndex:0,
        type:'value',
    },{
        polarIndex:1,
        type:'value',
    },{
        polarIndex:2
    }
    ],
    polar: [{
        center:['200','600'],
        radius:100,
    },{
        center:['600','600'],
        radius:100,
    },{
        center:['600','300'],
        radius:100,
    }],
    polar1:[{
        center:['200','600'],
        radius:100,
    }],
    series: [{
        type: 'bar',
        // data:[[1,0,],[2,10],[3,20],[4,30]],
        data: [2, 2, 3, 4, 3, 4, 2,2],
        coordinateSystem: 'polar',
        name: 'A',
        stack:'a',
        polarIndex:0,
        // barWidth:30,
    },{
        type: 'bar',
        data: [1, 2, 3, 4, 1, 4, 1],
        coordinateSystem: 'polar',
        name: 'C',
        stack:'b',
        polarIndex:1,
        angleAxisIndex:1,
        radiusAxisIndex:1,
    },{
        type: 'bar',
        data: [1, 2, 3, 4, 1,4,1,1],
        coordinateSystem: 'polar',
        name: 'D',
        polarIndex:2,
    }],
};
@deqingli
Copy link
Member

sorry, I don't understand what you want? Can you tell us the expected performance you want?

@deqingli deqingli added missing-demo The author should provide a demo. waiting-for-author labels Dec 21, 2018
@mm007008009
Copy link
Author

polar1

@mm007008009
Copy link
Author

mm007008009 commented Dec 22, 2018

I want to know why the barWidth of a histogram is not fixed in multiple polar coordinates.

@explorerNW
Copy link

from the source code, I found, the startAngle and endAngle calculate incorrect in function calRadialBar.And in each series, i set the barWidth: 40.but in the calRadialBar function, only the lastest series barWidth is useable.

@explorerNW
Copy link

In barLayoutPolar function, the variable of columnOffset,is incorrect, and i bug found, the stacks's is calculate incorrect in calRadialBar function.

@pissang pissang added pending We are not sure about whether this is a bug/new feature. and removed missing-demo The author should provide a demo. waiting-for-author labels Jan 4, 2019
@Ovilia
Copy link
Contributor

Ovilia commented Jan 4, 2019

This seems to be a bug.

@Ovilia Ovilia added bug priority: high and removed pending We are not sure about whether this is a bug/new feature. labels Jan 4, 2019
@Ovilia Ovilia added this to the 4.3.0 milestone Jan 29, 2019
100pah added a commit that referenced this issue Feb 14, 2019
* 'master' of https://github.com/apache/incubator-echarts:
  fix(polar): barWidth calculation when stack on multiple polars #9626
  Update readme download methods
  Added echarts4r
  Typo in comment (#9892)
  Fix typo in code comment
  Add my keys (#9876)
  Spanish translation of javascript file
  fix: fix tooltip position 重复计算 padding issue
  Add CDN link
@ThomasChan
Copy link

ThomasChan commented May 21, 2019

@Ovilia i still get this problem in version echarts-4.2.1-rc3

you can try following options:

option = {
    angleAxis: {
        max: 5,
    },
    radiusAxis: {
        type: 'category',
        data: ['周一', '周二'],
        z: 10
    },
    polar: {
    },
    series: [{
        type: 'bar',
        data: [4, 4],
        coordinateSystem: 'polar',
        name: 'A',
        barGap: "-100%",
        barWidth: '60%',
        itemStyle: {
            normal: {
                color: '#dadada'
            }
        }
    }, {
        type: 'bar',
        data: [1, 2],
        coordinateSystem: 'polar',
        name: 'B',
        barWidth: '60%',
    }]
};

you will see category 'A' and 'B' barWidth is not equal to '60%',
and this problem only happen when barWidth large than '50%'.

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