Skip to content
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
Closed

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

M1ns opened this issue Apr 21, 2016 · 7 comments
Labels

Comments

@M1ns
Copy link

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
Copy link
Contributor

pissang commented Apr 21, 2016

name: '\n' 可以换行

@M1ns
Copy link
Author

M1ns commented Apr 21, 2016

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

@pissang
Copy link
Contributor

pissang commented Apr 21, 2016

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

@M1ns
Copy link
Author

M1ns commented Apr 21, 2016

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

@pissang pissang added the bug label Apr 21, 2016
@pissang
Copy link
Contributor

pissang commented Apr 21, 2016

好像是的,谢谢反馈

@julien-joe
Copy link

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

@CeleKing
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants