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

echarts3 图例(legend)不能手动换行 #3039

Closed
M1ns opened this Issue Apr 21, 2016 · 7 comments

Comments

Projects
None yet
4 participants
@M1ns

M1ns commented Apr 21, 2016

问题简述 (One-line summary)

ECharts 3 是否不支持legend手动换行功能,若支持应如何操作?

版本及环境 (Version & Environment)

  • ECharts 版本 (ECharts version):3.1.5
  • 浏览器类型和版本 (Browser version):chrome 49.0.2623.87 m (64-bit)
  • 操作系统类型和版本 (OS Version):win8.1 专业版

重现步骤 (Steps to reproduce)

期望结果 (Expected behaviour)

legend手动换行

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

ECharts配置项 (ECharts option)

option = {
                tooltip : {
                    trigger: 'item',
                    formatter: "{b}</br>比例:{d}%"
                },
                legend: {
                    left: 'center',
                    bottom: '5%',
                    selectedMode: false,
                    data: ['a','b','','c']
                },

                series : [
                    {
                        type: 'pie',
                        radius : '50%',
                        center: ['50%', '30%'],
                        data:[{value:3,name:'a'},{value:2,name:'b'},{value:1,name:'c'},],
                        itemStyle: {
                            normal:{
                                label:{
                                    formatter:'{d}%',
                                    textStyle:{
                                        fontFamily: '"Microsoft YaHei", Arial, Verdana, sans-serif'
                                    }
                                }
                            }
                        }
                    }
                ]
}

其他信息 (Other comments)

@pissang

This comment has been minimized.

Show comment
Hide comment
@pissang

pissang Apr 21, 2016

Contributor

name: '\n' 可以换行

Contributor

pissang commented Apr 21, 2016

name: '\n' 可以换行

@M1ns

This comment has been minimized.

Show comment
Hide comment
@M1ns

M1ns Apr 21, 2016

抱歉可能表述得不清晰..
'\n'只是文字换行..我想表达的是[如图]的意思
filehelper_1461219106225_14
的效果

M1ns commented Apr 21, 2016

抱歉可能表述得不清晰..
'\n'只是文字换行..我想表达的是[如图]的意思
filehelper_1461219106225_14
的效果

@pissang

This comment has been minimized.

Show comment
Hide comment
@pissang

pissang Apr 21, 2016

Contributor

我指的就是这个,空字符串也可以,'\n' 换行是 3 中新加的

Contributor

pissang commented Apr 21, 2016

我指的就是这个,空字符串也可以,'\n' 换行是 3 中新加的

@M1ns

This comment has been minimized.

Show comment
Hide comment
@M1ns

M1ns Apr 21, 2016

啊,那这个地方可能bug了,饼图的legend 空字符和换行符都没有反应,其他图表我试过可以了

M1ns commented Apr 21, 2016

啊,那这个地方可能bug了,饼图的legend 空字符和换行符都没有反应,其他图表我试过可以了

@pissang pissang added the bug label Apr 21, 2016

@pissang

This comment has been minimized.

Show comment
Hide comment
@pissang

pissang Apr 21, 2016

Contributor

好像是的,谢谢反馈

Contributor

pissang commented Apr 21, 2016

好像是的,谢谢反馈

@pissang pissang closed this in 195095f Apr 21, 2016

@julien-joe

This comment has been minimized.

Show comment
Hide comment
@julien-joe

julien-joe Apr 27, 2016

图例中图片和文字不能够水平居中对齐

julien-joe commented Apr 27, 2016

图例中图片和文字不能够水平居中对齐

@CeleKing

This comment has been minimized.

Show comment
Hide comment
@CeleKing

CeleKing Jan 10, 2017

个性化图例样式 怎么传入空的字符串啊?

CeleKing commented Jan 10, 2017

个性化图例样式 怎么传入空的字符串啊?

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