Echarts.js scale label to achieve rich text to achieve the effect of Chinese + picture, solve

problem description

echarts.js scale tag to achieve rich text to achieve the effect of Chinese + pictures, solve:

clipboard.png

echartsdemodemo

+:

clipboard.png

but if you want to achieve the effect of picture + Chinese, which in this case is picture + Monday, how to change the following code? Solve.

related codes

/ / this is my own example, the X-axis configuration item code

                xAxis: { //x
                    type: "category",
                    boundaryGap: false,
                    data: ["Mon", "Tue", "Wed","Thu","Fri","Sat","Sun"],
                    axisLine: {
                        show: false //
                    },
                    axisTick: {
                        show: false,  //
                        interval:0
                    },
                    axisLabel: {   //--
                        formatter: function (value) {
                            return "{" + value + "| }\n{value|" + value + "}";
                        },
                        interval:0, // 0 
                        margin: 20,
                        rich: {     //x--+
                            value: {
                                lineHeight: 20,
                                align: "center"
                            },
                            Mon: {         //data
                                height: 20,
                                align: "center",
                                backgroundColor: {
                                    image: str[0]
                                }
                            },
                            Tue: {
                                height: 20,
                                align: "center",
                                backgroundColor: {
                                    image: str[1]
                                }
                            },
                            Wed: {
                                height: 20,
                                align: "center",
                                backgroundColor: {
                                    image: str[2]
                                }
                            },
                            Thu: {
                                height: 20,
                                align: "center",
                                backgroundColor: {
                                    image: str[3]
                                }
                            },
                            Fri: {
                                height: 20,
                                align: "center",
                                backgroundColor: {
                                    image: str[4]
                                }
                            },
                            Sat: {
                                height: 20,
                                align: "center",
                                backgroundColor: {
                                    image: str[5]
                                }
                            },
                            Sun: {
                                height: 20,
                                align: "center",
                                backgroundColor: {
                                    image: str[6]
                                }
                            },
                        }
                    },
                },
May.26,2021

try rewriting axisLabel.formatter:

return '{' + value + '| }\n{value|' + getDay(value) + '}';
function getDay(name){
    switch(name){
        case 'Mon':
            return '';
        case 'Tue':
            return '';
        ...
    }
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf7039-47085.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf7039-47085.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?