echarts icon indicating copy to clipboard operation
echarts copied to clipboard

柱状图空值会堆叠

Open mattxu-zz opened this issue 10 years ago • 0 comments

问题简述 (One-line summary)

我用柱状图显示最近24小时的数据,x轴是category然后固定显示最近24个小时,然后那个小时没有数据的话会显示为空。但是我将浏览器缩小后,那些为空的柱会与其他不为空的柱堆叠,使得有些有数据的柱状变得比它在x轴所对应的那一列还要粗。

版本及环境 (Version & Environment)

  • ECharts 版本 (ECharts version):3.2.2
  • 浏览器类型和版本 (Browser version):Chrome
  • 操作系统类型和版本 (OS Version):win10

重现步骤 (Steps to reproduce)

期望结果 (Expected behaviour)

可能哪里有问题 (What went wrong)

ECharts配置项 (ECharts option)

///

    return {
        "title": {
            "subtext": "",
            "x": "center"
        },
        "tooltip": {
            "trigger": "axis",
            "axisPointer": {
                "type": "shadow"
            }
        },
        "toolbox": {
            "feature": {
                "dataZoom": {
                    "title": {
                        "zoom": "area zoom",
                        "back": "area zoom back"
                    },
                    "yAxisIndex": "none"
                },
                "restore": {
                    "title": "restore"
                },
                "saveAsImage": {
                    "title": "save as image"
                }
            }
        },
        "xAxis": [
            {
                "type": "category",
                "data": []
            }
        ],
        "series": [

        ],
        "animation": true,
        "yAxis": [
            {
                "type": "value",
                "minInterval": 1
            }
        ],
        "color": ["#FCF7B6", "#58AB27", "#B3D9EE", "#0081C7", "#004494"],
        "grid": {
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
        }
    };

其他信息 (Other comments)

mattxu-zz avatar Aug 02 '16 06:08 mattxu-zz