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

Behavior change between echarts 4.0.2 and 4.0.3: unselected data series now influences chart visuals #7831

Closed
wartab opened this issue Feb 28, 2018 · 0 comments
Labels

Comments

@wartab
Copy link

wartab commented Feb 28, 2018

One-line summary [问题简述]

Unselected data series influence the way the charts look.

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: 4.0.3
  • Browser version [浏览器类型和版本]: All
  • OS Version [操作系统类型和版本]: All

Expected behaviour [期望结果]

Unselected data series should not have an impact on the visuals (at least not after a minor version increase).

ECharts option [ECharts配置项]

option = {
    "backgroundColor": "#fff",
    "legend": {
        "data": [
            "Category 1",
            "Category 2"
        ],
        "selected": {
            "Category 1": true,
            "Category 2": false
        },
        "align": "right",
        "right": 10,
        "orient": "vertical",
        "selectedMode": "single"
    },
    "tooltip": {},
    "xAxis": {
        "type": "category",
        "data": [
            "mai",
            "juin",
            "juil.",
            "août",
        ],
        "splitLine": {
            "show": true,
            "lineStyle": {
                "color": [
                    "#f0f0f0"
                ]
            }
        }
    },
    "yAxis": {
        "type": "value",
        "splitLine": {
            "show": true,
            "lineStyle": {
                "color": [
                    "#f0f0f0"
                ]
            }
        },
    },
    "series": [
        {
            "name": "Category 2",
            "type": "bar",
            "data": [
                1230,
                2560,
                3780,
                49100,
            ],
            "itemStyle": {"normal": {"color": "#fd7270","barBorderWidth": 1,"barBorderColor": "#e06462"}},
        },
        {
            "name": "Category 1",
            "type": "bar",
            "data": [
                1526,
                16516,
                68432,
                65460,
            ],
            "itemStyle": {"normal": {"color": "#58b7ff","barBorderWidth": 1,"barBorderColor": "#4893ce"}},
        },
        {
            "name": "Category 2",
            "type": "bar",
            "data": [
                30587,
                22400,
                26171,
                19011,
            ],
            "itemStyle": {"normal": {"color": "#b62b28","barBorderWidth": 1,"barBorderColor": "#7a1e1d"}},
        },
        {
            "name": "Category 1",
            "type": "bar",
            "data": [
                46641,
                50055,
                40590,
                42280,
            ],
            "itemStyle": {"normal": {"color": "#005bbc","barBorderWidth": 1,"barBorderColor": "#004e9b"}},
        }
    ]
}

Other comments [其他信息]

Screenshot of 4.0.2
echarts-4 0 2

Screenshot of 4.0.3
echarts-4 0 3

@pissang pissang added the bug label Feb 28, 2018
@100pah 100pah closed this as completed in 6f13fb7 Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants