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

树图在radial布局下label的rotate属性失效 #8559

Closed
OrdinaryWelsh opened this issue Jun 21, 2018 · 2 comments
Closed

树图在radial布局下label的rotate属性失效 #8559

OrdinaryWelsh opened this issue Jun 21, 2018 · 2 comments

Comments

@OrdinaryWelsh
Copy link

One-line summary [问题简述]

在树图的radial布局下因为根节点的标签显示为纵向的不太美观希望改成相对于容器横向来显示,结果发现rotate选项在这种布局下失效

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:v4.1.0.rc2
  • Browser version [浏览器类型和版本]:Chrome version 67.0.3396.87
  • OS Version [操作系统类型和版本]:Windows 10 专业版 1709

Expected behaviour [期望结果]

image

ECharts option [ECharts配置项]

option = {
myChart.showLoading();



var data2 = {
    name: "flare",
    label: {
        normal:{// show:false,
        rotate:90,
        // offset:[30,40]
        }
    },
    "children": [
        {
            "name": "flex",
            
        },
        {
            "name": "scale"
            
           
        },
        {
            "name": "display",
            
        }
    ]
};

myChart.hideLoading();

myChart.setOption(option = {
    tooltip: {
        trigger: 'item',
        triggerOn: 'mousemove'
    },
    legend: {
        top: '2%',
        left: '3%',
        orient: 'vertical',
        data: [
        {
            name: 'tree2',
            icon: 'rectangle'
        }],
        borderColor: '#c23531'
    },
    series:[

        {
            type: 'tree',
            layout:'radial',
            name: 'tree2',
            data: [data2],

            top: '20%',
            left: '20%',
            bottom: '22%',
            right: '18%',
            
            symbolSize: 7,

            label: {
                normal: {
                    rotate:-90
                    // position: 'left',
                    // verticalAlign: 'middle',
                    // align: 'right'
                }
            },

            leaves: {
                label: {
                    normal: {
                        rotate:-90
                    //     position: 'right',
                    //     verticalAlign: 'middle',
                    //     align: 'left'
                    }
                }
            },

            expandAndCollapse: true,

            animationDuration: 550,
            animationDurationUpdate: 750
        }
    ]
});
}

Other comments [其他信息]

@deqingli
Copy link
Member

#10412

@deqingli
Copy link
Member

This bug was resolved with PR #11457

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

No branches or pull requests

2 participants