Sign in

Is there a solution to the bug in the official example of ecarts map scatter diagram?

BKS edited in Fri, 25 Nov 2022


Sample link: https://www.echartsjs.com/exa...

In this official example, the PM2.5 index of Wuhan is named 273, but the latitude value of Wuhan is displayed on the tooltip in the map.

When I use this component, I also encounter this problem. What can I do to solve this bug? According to the official example, when setting the data of tooltip [longitude, latitude, numerical value], the error is obvious here.

1 Replies
commented on Sat, 26 Nov 2022

The key is to change the settings of 444 lines of tooltip to this

tooltip : {
        trigger: 'item',
        formatter: function(params) {
            return `${params.name}: ${params.data.value[2]}`