Skip to content

使用echarts-gl的map3D,文字显示不正常,变成块状 #6780

@dutao-zfl

Description

@dutao-zfl

One-line summary [问题简述]

使用echarts-gl的map3D,文字显示不正常,变成块状
下面的配置项是用世界地图为例,显示也是不正常的,可在社区直接查看

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:
    echarts: 3.5.4
    echarts-gl:1.0.0-alpha.8
  • Browser version [浏览器类型和版本]:
    chrome 60.0.3112.78 64位
  • OS Version [操作系统类型和版本]:
    window7.0

Expected behaviour [期望结果]

ECharts option [ECharts配置项]

$.getJSON('/asset/get/s/data-1491897030366-r1Ap5Wcag.json', function(populationData) {

    var max = -Infinity;
    var min = Infinity;
    populationData.forEach(function(item) {
        max = Math.max(Math.log(item.value), max);
        min = Math.min(Math.log(item.value), min);
    });

    var regions = populationData.map(function(item) {
        return {
            name: item.name,
            height: (Math.log(item.value) - min) / (max - min) * 3
        };
    })

    myChart.setOption(option = {
        backgroundColor: '#cdcfd5',
        title: {
            show: false,
            text: 'Globe Visualization'
        },
        tooltip: {
            show: false,
            textStyle: {
                color: '#fff'
            },
            trigger: 'item'
        },
        visualMap: {
            bottom: 10,
            left: 'right',
            orient: 'horizontal',
            itemHeight: 10,
            pieces: [],
            inRange: {
                color: [
                    'rgba(66, 109, 68, 1)', // 'rgba(53, 92, 55, 1)'
                    'rgba(137, 122, 40, 1)', // 'rgba(137, 122, 40, 1)'
                    'rgba(139, 74, 74, 1)', //  ,'rgba(113, 53, 53, 1)'  'rgba(113, 53, 53, 1)'
                    'rgba(119, 97, 140, 1)' //   'rgba(100, 80, 119, 1)'
                ]
            },
            outOfRange: {
                color: 'rgba(66, 109, 68, 1)' // 'rgba(53, 92, 55, 1)'
            },
            textStyle: {
                color: '#90a8c8',
                fontSize: 14
            }
        },
        series: [{
            type: 'map3D',
            map: 'world',
            boxWidth: 60,
            boxHeight: 5,
            top: 30,
            bottom: 0,
            shading: 'lambert',
            lambertMaterial: {
                baseTexture: '',
                textureTiling: 50
            },
            postEffect: {
                enable: true,
                SSAO: {
                    enable: true,
                    radius: 1
                }
            },
            groundPlane: {
                show: false
            },
            viewControl: {
                distance: 100,
                // autoRotate: true,
                // autoRotateAfterStill: 5,
                alpha: 60,
                beta: 50
                    // beta: 0
            },
            label: {
                normal: {
                    show: true,
                    textStyle: {
                        color: 'rgba(255, 255, 255, .5)',
                        fontSize: 16,
                        fontFamily: 'Microsoft yahei',
                        borderWidth: 0
                    }
                }
            },
            itemStyle: {
                borderColor: 'rgba(255, 255, 255, .7)',
                borderWidth: 1,
                areaColor: '#1f4a6e'
            },
            // environment: '../../../static/img/check.gif',
            data: []
        }]
    });

});

Other comments [其他信息]

image
这是在社区的demo显示的效果,文字呈块状

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleInactive for a long time. Will be closed in 7 days.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions