How to omit the content of x-axis label text in Echarts

clipboard.png
requirements: for example, the words "wed" on the x-axis above, if there are too many words, will squeeze out the values on both sides. Now I want to keep the three-digit ellipsis display for him too long, indicating that the contents in the pop-up window need to be fully displayed. After looking for the document for a long time, I did not see the corresponding configuration items. I hope the boss will give me some advice

.

axisLabel has a formatter attribute. Make do with the following pseudocode

xAxis : [
    {
        type : 'category',
        data : ['Mon', 'Tue', 'Wedssssssssssss', 'Thu', 'Fri', 'Sat', 'Sun'],
        axisTick: {
            alignWithLabel: true
        },
        axisLabel: {
            formatter: function (value, index) {
                // 10 6 
                var v = value.substring(0, 6) + '...'
                return value.length > 10 ? v : value
            }
        }
    }
],

clipboard.png

Menu