apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.44k stars 19.61k forks source link

Bar Polar Stack with Negative Values #9364

Closed AndLLA closed 3 years ago

AndLLA commented 5 years ago

One-line summary [问题简述]

Negative values in a "Bar Polar Stack" move the stack starting point from 0 to the lowest value (e.g. -1). In this way bars starts from the lowest (negative) value rather than 0, which leads to a miss-representation of the true areas size. Some stacks disappear "randomly".

Version & Environment [版本及环境]

Expected behaviour [期望结果]

All bars should start from zero, with negative values going in the opposite direction (e.g. counter clock-wise), in order to maintain a proper representation of each "area". All stacks should still be visible.

ECharts option [ECharts配置项]

option = {
    angleAxis: {
         min:-1, max:15,
    },
    radiusAxis: {
        type: 'category',
        data: ['aa', 'bb', 'cc', 'dd'],
        z: 10
    },
    polar: {
    },
    series: [{
        type: 'bar',
        data: [1, 2, 3, -1],
        coordinateSystem: 'polar',
        name: 'A',
        stack: 'a'
    }, {
        type: 'bar',
        data: [2, 4, 6, 8],
        coordinateSystem: 'polar',
        name: 'B',
        stack: 'a'
    }, {
        type: 'bar',
        data: [1, 2, 3, 4],
        coordinateSystem: 'polar',
        name: 'C',
        stack: 'a'
    }],
    legend: {
        show: true,
        data: ['A', 'B', 'C']
    }
};

Here an example, notice the missing red bar for the "dd" ring.

screenshot from 2018-11-08 06-54-57

Other comments [其他信息]

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 3 years ago

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!