Toolbox的textPosition不生效? #4104

Closed
polyrabbit opened this Issue Sep 18, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@polyrabbit

问题简述 (One-line summary)

Toolbox显示的文字默认在图标的下方,在treemap放大以后那些文字根本看不清,所以我想把文字显示在图标的上方,根据代码里提示的,我设置了toolbox.iconStyle.emphasis.textPositiontop,但是怎样都不生效。不知道具体改怎么做?谢谢~
image

版本及环境 (Version & Environment)

  • ECharts 版本 (ECharts version): 3.1.10
  • 浏览器类型和版本 (Browser version): Chrome/53.0.2785.101
  • 操作系统类型和版本 (OS Version): OS X 10_11_6

ECharts配置项 (ECharts option)

option = {
                    backgroundColor: '#eee',
                    legend: {
                        borderWidth: 1,
                        data: [{
                            name: 'bar'
                        }, 'bar2', '\n', 'bar3', 'bar4'],
                        selected: {
                            // 'bar': false
                        },
                        // orient: 'vertical',
                        // x: 'right',
                        // y: 'bottom',
                        align: 'left'
                    },
                    toolbox: {
                        // y: 'bottom',

                        iconStyle: {
                            normal: {
                                borderColor: '#666',
                                color: 'none'
                            },
                            emphasis: {
                                borderColor: '#000',
                                textPosition: 'left'
                            }
                        },

                        feature: {
                            saveAsImage: {
                                pixelRatio: 2,
                                iconStyle: {
                                    normal: {
                                        borderColor: '#666',
                                        color: 'none'
                                    },
                                    emphasis: {
                                        borderColor: '#000',
                                        textPosition: 'left'
                                    }
                                }
                            }
                        }
                    },
                    tooltip: {},
                    xAxis: {
                        data: xAxisData,
                        name: '横轴',
                        silent: false,
                        axisLine: {
                            onZero: true
                        },
                        splitLine: {
                            show: false
                        },
                        splitArea: {
                            show: false
                        }
                    },
                    yAxis: {
                        inverse: true,
                        splitArea: {
                            show: false
                        }
                    },
                    series: [{
                        name: 'bar',
                        type: 'bar',
                        stack: 'one',
                        itemStyle: itemStyle,
                        data: data1
                    }, {
                        name: 'bar2',
                        type: 'bar',
                        stack: 'one',
                        itemStyle: itemStyle,
                        data: data2
                    }, {
                        name: 'bar3',
                        type: 'bar',
                        stack: 'two',
                        itemStyle: itemStyle,
                        data: data3
                    }, {
                        name: 'bar4',
                        type: 'bar',
                        stack: 'two',
                        itemStyle: itemStyle,
                        data: data4
                    }]
                }

@100pah 100pah closed this in 0de7f3c Sep 19, 2016

@polyrabbit

This comment has been minimized.

Show comment
Hide comment
@polyrabbit

polyrabbit Sep 19, 2016

谢谢,这个fix工作了,不知道新版本什么时候能release?

谢谢,这个fix工作了,不知道新版本什么时候能release?

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