Echarts tooltip prompt box does not display

The prompt box of

echarts radar is not displayed, but the console print can print data
clipboard.png
this is my specific code, if you have trouble in this situation, please take a look at it for me, thank you
`drawLine () {

        let myChart = this.$echarts.init(document.getElementById("smain"));
        myChart.setOption({
            tooltip : {
                show : true,
                trigger: "item",
                formatter : function(params){
                    console.log(params)
                },
            },
            angleAxis: {
                axisLine: {
                    // 
                    show: true,
                    lineStyle: {
                        color: "rgba(255,255,255,0.2)"
                    }
                }
            },
            legend: {
            },
            radiusAxis: {
                max: 100,
                min: 0,
                interval: 20,
                splitLine: false,
                axisLabel: {
                    color: "-sharp2458FF"
                }
            },
            polar: {
                radius : this.r1
            },
            radar: {                    
                nameGap: 3,
                radius : this.r2,
                name: {
                    textStyle: {
                        color: "-sharp2458FF",
                        backgroundColor: "transparent",
                        borderRadius: 3,
                        padding: [10, 5]
                    },
                    formatter: text => {
                        if (
                            text == "50" ||
                            text == "" ||
                            text == "1000" ||
                            text == "" ||
                            text == "" ||text == ""
                        ) {
                            text = text.replace(/\S{2}/g, function(match) {
                                return match + "\n";
                            });
                        }
                        return text;
                    }
                },
                indicator: this.$store.state.homedataStore.sportsinfo
                    .sportsname,
                splitArea: {
                    show: true,
                    areaStyle: {
                        color: ["transparent"] // 
                    }
                },
                splitLine: {
                    show: true,
                    lineStyle: {
                        width: 1,
                        color: "rgba(255,255,255,0.2)" // 
                    }
                },
                axisLine: {
                    // 
                    show: true,
                    lineStyle: {
                        width: 1,
                        color: "rgba(255,255,255,0.2)" // 
                    }
                }
            },
            series: [
                {
                    type: "radar",
                    //symbol: "none", // 
                    data: [
                        {
                            name : this.$store.state.homedataStore
                                .sportsinfo.dataname,
                            value: this.$store.state.homedataStore
                                .sportsinfo.sportsvalue
                        }
                    ],
                    itemStyle: {
                        color: "-sharpfff",
                        borderColor: "-sharp65d6ff"
                    },
                    lineStyle: {
                        color: "-sharp2458FF"
                    },
                    areaStyle: {
                        color: "rgba(255,255,255,0.08)"
                    }
                }
               
            ]
        });
        $(window).resize(function() {
            myChart.resize();
        });
    }`
Sep.01,2021

Building Master, Hello ~
the problem comes from the formatter function in your tooltip , which must be return . You can get rid of it and give it a try. Or add your own content that needs to be formatted. Such as the following code:

...
 tooltip: {
    show: true,
    trigger: 'item',
    formatter: function(params){
        console.log(params)
        return params;
    },
},
...
< hr >

if it is helpful, please click to adopt it, thank you ~

Menu