New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treemap图 label中formatter属性不存在 #5757

Closed
sadkilo opened this Issue May 16, 2017 · 1 comment

Comments

Projects
None yet
4 participants
@sadkilo

sadkilo commented May 16, 2017

[问题简述]
echarts中无论是柱状图,线图,饼图, label都有formatter
在echarts2中 treemap图 label是可以设置formatter的,但是echart3中,formatter不生效

[版本及环境]
[ECharts 版本]:3
[浏览器]:google
[环境]: gallery在线编辑

Expected behaviour [期望结果]

treemap图 label提供formatter 属性

ECharts option [ECharts配置项]

option = {
    title: {
        text: 'Similar indicator display',
    },

    calculable: false,
    series: [{
        name: '矩形图',
        type: 'treemap',
        itemStyle: {
            normal: {
                label: {
                    show: true,
                    formatter: "{b}:{c}",
                    fontSize: 15
                },

                borderWidth: 1
            },
            emphasis: {
                label: {
                    show: true
                }
            }
        },
        label: {
            normal: {
                textStyle: {
                    fontSize: 15,
                    formatter: "{b}:{c}"
                }
            },
            formatter: "{b}:{c}"
        },
        breadcrumb: { //关闭面包屑路径
            show: false
        },
        roam: false, //关闭平移拖动
        nodeClick: false, //关闭节点点击
        silent: false, //关闭鼠标事件
        data: [{
            value: 3,
            children: [{
                name: '指标A1',
                value: 10,
                itemStyle: {
                    normal: {
                        color: '#fc2d2f'
                    }
                }
            }, {
                name: '指标A2',
                value: 10,
                itemStyle: {
                    normal: {
                        color: '#fc3d2f'
                    }
                }
            }, {
                name: '指标A3',
                value: 10,
                itemStyle: {
                    normal: {
                        color: '#fc4d2f'
                    }
                }
            }]
        }]
    }]
};

@sadkilo sadkilo changed the title from treemap 标签中formatter不存在 to treemap图 label中formatter属性不存在 May 16, 2017

@soundtina

This comment has been minimized.

Show comment
Hide comment
@soundtina

soundtina May 18, 2017

我也遇到这个问题啊,这可怎么解决呢

我也遇到这个问题啊,这可怎么解决呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment