'How to make the x-axis data of echarts selectable

I want to make the x-axis data selectable, that is, I can click a component, and then the x-axis will appear the corresponding abscissa, and then click again, and the abscissa will disappear. I want to make each abscissa selectable to display or not to display. Taking the following chart as an example, I can selectively look at the data of Monday and Saturday, or look at the data of Friday, This is the case.

option = {
    title: {
        text: 'Awesome Chart'
    },
    xAxis: {
        data: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
    },
    yAxis: {},
    series: [{
        type: 'bar',
        data:[220, 182, 191, 234, 290, 330, 310]
    }]
};

Chart edit link: https://www.makeapie.com/editor.html?c=xDrVLTK8SP&v=2

Sample chart



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source