ecomfe / echarts-gl

Extension pack for Apache ECharts, providing globe visualization and 3D plots.
BSD 3-Clause "New" or "Revised" License
2.61k stars 844 forks source link

能不能给一个mapbox的 scatter3d的tooltip的例子? #147

Open adsort opened 6 years ago

adsort commented 6 years ago
 option = {
            title: {
                x: 'right',
                text: "上海房价可视化",
                subtext: '随机抽样10000个,数据提取自链家',
                textStyle: {
                    color: '#fff',
                    fontSize: 30
                }
            },
            tooltip: {
                trigger: 'item',
                formatter: (data) => {
                    console.log(data);
                    // return data.seriesName+"<br />"+data.name+":"+data.value[2];
                }
            },

            animation: false,
            mapbox: {
                center: [121.4693, 31.123070],
                zoom: 9,
                pitch: 60,

                 style: 'mapbox://styles/mapbox/light-v9',

                boxHeight: 50,
                altitudeScale: 3e2,
                postEffect: {
                    enable: true,
                    SSAO: {
                        enable: true,
                        radius: 2,
                        intensity: 1.5
                    }
                },

            },

            series: [{
                type: 'scatter3D',
                 coordinateSystem: 'mapbox',
                symbolSize: 8,

            }]
        }

            }]
        }

这样写好像没作用?

adsort commented 6 years ago

多次调试,貌似偶尔可以命中formatter,但是触发条件不明。。。

adsort commented 6 years ago

tooltip有了,series中要写 silent: false,新问题是,tooltip出现了2个,一个是预期的,还有个在鼠标上方,一直是NaN,不知道是啥,求解释

pissang commented 6 years ago

系列里加上 label: { show: false }

adsort commented 6 years ago

试了一下,确实是label,但加了label: { show: false }无效

zhang6685979 commented 6 years ago

series里加上emphasis:{label:{show:false}}就可以了

liujiusheng commented 6 years ago

@adsort 为什么我使用mapbox作为scatter3D的底图的时候,我的那些点数据都显示不出来呢?救指导

soulboyooops commented 5 years ago

同求解决办法...我的能够显示点,鼠标上去不触发,emphasis series tooltip都试了