Can the backgroundColor in legend in echarts be configured as a picture?

High fidelity is shown in figure

clipboard.png

:

clipboard.png

now the question: how to get the line in the high-fidelity red box? can the backgroundColor of legend be configured as a background picture?

the code is as follows:



option = {
    tooltip: {
        trigger: "item",
        formatter: "{a} <br/>{b}: {c} ({d}%)"
    },
    backgroundColor:"-sharp061622",
    legend: {
        width: "330",
        backgroundColor: "-sharp0c2539",
        textStyle: {
            color:"-sharpffffff",
            fontSize: "16"
        },
        padding: 30,
        itemGap: 30,
        bottom: "3%",
        align: "left",
        data:["","",""]
    },
    series: [
        {
            type:"pie",
            radius: [0, "35%"],
            color: ["-sharp0e3858"],
            label: {
                normal: {
                    position: "center",
                    color: "-sharpffffff",
                    fontSize: 22
                }
            },
            labelLine: {
                normal: {
                    show: false
                }
            },
            hoverAnimation: false,
            tooltip: {
                show: false
            },
            data:[
                {value:0, name:""}
            ]
        },
        {
            type:"pie",
            zlevel: -1,
            radius: [0, "60%"],
            color: ["-sharp0c2130"],
            label: {
                normal: {
                    position: "center",
                    color: "-sharpffffff",
                    fontSize: 22
                }
            },
            labelLine: {
                normal: {
                    show: false
                }
            },
            hoverAnimation: false,
            tooltip: {
                show: false
            },
            data:[
                {value:0, name:"0"}
            ]
        },
        {
            name:"",
            type:"pie",
            radius: ["40%", "55%"],
            color: ["-sharp00ccff","-sharp72f77f","-sharp7a3af1"],
            label: {
                normal: {
                    formatter: "  {b|:{c} }\n  {b|:} {per|{d}%} ",
                    align:"center",
                    rich: {
                        b: {
                            fontSize: 16,
                            lineHeight: 33,
                            color: "-sharpffffff",
                        },
                        per: {
                            fontSize: 16,
                            lineHeight: 33,
                        }
                    }
                }
            },
            labelLine: {
                length2: 50,
                lineStyle: {
                    width: 3
                }
            },
            data:[
                {value:335, name:""},
                {value:310, name:""},
                {value:234, name:""}
            ]
        }
    ]
};

topic description

sources of topics and their own ideas

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

Jun.29,2022

colors can be represented by RGB, such as' rgb (128,128,128)'. If you want to add alpha channels, you can use RGBA, such as' rgba (128,128,128,0.5)', or you can use hexadecimal format, such as'- sharpccc';

'.

you can use gradients for specific requirements


backgroundColor: new echarts.graphic.RadialGradient(0.3, 0.3, 0.8, [{
        offset: 0,
        color: '-sharp333'
    }, {
        offset: 1,
        color: '-sharp000'
    }])

is there anyone else

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-1b2bfb5-2b327.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-1b2bfb5-2b327.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?