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

环形图label太长顶去图形框外面了看不到 #8507

Closed
superZchen0701 opened this issue Jun 12, 2018 · 1 comment
Closed

环形图label太长顶去图形框外面了看不到 #8507

superZchen0701 opened this issue Jun 12, 2018 · 1 comment

Comments

@superZchen0701
Copy link

One-line summary [问题简述]

如下面图所示,因为数据问题把环形图label的数据展示框挤到图形外面了,图形的高度是确定的,450px。能否有办法让label数据展示框不在外面?

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:3.6.2
  • Browser version [浏览器类型和版本]:chrome 63.0.3239.132
  • OS Version [操作系统类型和版本]:windows 10专业版 64位操作系统

Expected behaviour [期望结果]

让label数据展示框不在外面

ECharts option [ECharts配置项]

option = {
                   title={{
                                text:'点赞率'
                            }}
                            tooltip={{
                                trigger: 'item',
                                axisPointer: {
                                    type: 'cross',
                                    label: {
                                        backgroundColor: '#6a7985'
                                    }
                                },
                                formatter: "{a} <br/>{b}: {c} ({d}%)"
                            }}
grid={{
                                // left:'3%',
                                // right: '4%',
                                // bottom: '3%',
                                top:'5%',
                                containLabel: true
                            }}
series={{
                                type:'pie',
                                name:'点赞率',
                                selectedMode:['single',''],
                                radius:[[0,'20%'],['30%','40%']],
                                label: [{
                                    normal: {
                                        position: 'inner'
                                    }
                                }, {
                                    normal: {
                                        formatter: '{a|{a}}{abg|}\n{hr|}\n  {b|{b}:}{c} \n {per|{d}%}  ',
                                        backgroundColor: '#eee',
                                        borderColor: '#aaa',
                                        borderWidth: 1,
                                        borderRadius: 4,
                                        padding: [0,0,4,0],
                                        rich: {
                                            a: {
                                                color: '#999',
                                                lineHeight: 18,
                                                align: 'center'
                                            },
                                            hr: {
                                                borderColor: '#aaa',
                                                width: '100%',
                                                borderWidth: 0.5,
                                                height: 0
                                            },
                                            b: {
                                                fontSize: 10,
                                                lineHeight: 18
                                            },
                                            per: {
                                                color: '#eee',
                                                backgroundColor: '#334455',
                                                padding: [2, 4],
                                                borderRadius: 2
                                            }
                                        }
                                    }
                                }],
                                labelLine:[{
                                    normal: {
                                        show: false
                                    }
                                },{}],
                                data:[this.state.qryHeatImg_dz,this.state.qryHeatImg_dz_industry]
                            }}
}

Other comments [其他信息]

qq 20180612155948

@airwin
Copy link

airwin commented Jun 13, 2018

饼图标签溢出bug,可以参照这个PR #8513 自行修改,官方似乎不怎么维护issue了

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

No branches or pull requests

3 participants