Skip to content

treemap中label的emphasis 与 normal 显示有问题 #2975

@ASenBoy

Description

@ASenBoy

问题简述 (One-line summary)

当在treemap中label设置normal不显示 emphasis显示时,当鼠标在矩形中浮动时,任然不显示文本。

版本及环境 (Version & Environment)

  • ECharts 版本 (ECharts version):3.1.6
  • 浏览器类型和版本 (Browser version):chrome 49.0.2623.110 m IE 11
  • 操作系统类型和版本 (OS Version): win7 专业版

重现步骤 (Steps to reproduce)

1.label: {
normal: {
show: false,//正常状态下 不显示文本

                    },
                    emphasis: {
                        show: true,//鼠标经过时 显示文本
                        textStyle:{
                            color:'#fff',
                            fontWeight:'bold',
                            fontSize:40
                        }
                    }
                },

期望结果 (Expected behaviour)

正常状态下不显示文本,当鼠标经过时显示文本

可能哪里有问题 (What went wrong)

ECharts配置项 (ECharts option)

option = {

                tooltip : {
                    trigger: 'item',
                    formatter: "{b}: {c}"
                },





                dataRange: {
                    orient:'horizontal',
                    x:'center',
                    itemHeight:800,

                    min: -5,
                    max: 5,                 
                    calculable: true,
                    color:['#0fe600','#0b9e00','#054d00','#000','#520000','#b80000','#ff0000'],
                    textStyle: {
                        color: '#fff'
                    }
                },

                series:[
                {
                    type:'treemap',
                    data:stockdata,
                    width:'100%',
                    roam:false,

                    levels:[
                    {
                        visualDimension:1,
                        colorMappingBy:'value',
                        itemStyle:{
                            normal:{
                                borderColor:"#000",
                                gapWidth:-1
                            }
                        },  
                    }
                    ],

                    label: {
                        normal: {
                            show: false,

                        },
                        emphasis: {
                            show: true,
                            textStyle:{
                                color:'#fff',
                                fontWeight:'bold',
                                fontSize:40
                            }
                        }
                    },

                },  
                ]




            }

其他信息 (Other comments)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions