Skip to content

Default - Legend.selected:false on multiple y-axis, needs double click to show #10050

@skelly2212

Description

@skelly2212

Version

4.2.1-rc1

Steps to reproduce

option = {
    legend: [{
        data:['left1','left2'],
        selected: {
            'left1': true,
            'left2': false,
            },
        orient: 'vertical',
        left:30,
        bottom: '85%',
    },{
        data:['right1','right2'],
        selected: {
            'right1': false,
            'right2': false,
            },
        orient: 'vertical',
        right:30,
        bottom: '85%'            
    }],

//===================//
    xAxis: {
        type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
    },
    
//===================//
    yAxis: [{
        type: 'value',
        name:'Left',
    },{
        type:'value',
        name:'Right',
    }],
    
//===================//    
    series: [{
        data: [820, 932, 901, 934, 1290, 1330, 1320],
        type: 'line',
        name:'left1'
    },
    {
        data: [280, 450, 654, 865, 1003, 1254, 1298],
        type: 'line',
        name:'left2'
    },
    
    { data: [50, 80, 25, 34, 56, 76, 87],
        type: 'line',
        name:'right1',
        yAxisIndex:1,
    },   
    { data: [43, 54, 35, 39, 46, 58, 72],
        type: 'line',
        name:'right2',
        yAxisIndex:1,
    }]
};

What is expected?

Legend/Series visibility should toggle when Legend item is clicked.

What is actually happening?

Requires double click to first toggle Legend/Series visibility

Metadata

Metadata

Assignees

Labels

bugenThis issue is in EnglishstaleInactive for a long time. Will be closed in 7 days.topic: legend

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions