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

[Bug] when pie legend icon="circle", series itemStyle influence it's size. #20617

Open
WangJinfeng000202 opened this issue Dec 24, 2024 · 1 comment
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature.

Comments

@WangJinfeng000202
Copy link

Version

5.1.0.0-current

Link to Minimal Reproduction

without

Steps to Reproduce

``

<title>ECharts 饼图示例</title> <script src="https://cdnjs.cloudflare.com/ajax/libs/echarts/5.2.2/echarts.min.js"></script>
<script> var myChart = echarts.init(document.getElementById('main'));
    var option = {
        title: {
            text: '访问来源',
            left: 'center'
        },
        legend: {
            icon: 'circle',
            itemWidth: 8
        },
        tooltip: {
            trigger: 'item',
            formatter: '{a} <br/>{b} : {c} ({d}%)'
        },
        series: [
            {
                name: '访问来源',
                type: 'pie',
                radius: '50%',
                data: [
                    {value: 1048, name: '搜索引擎'},
                    {value: 735, name: '直接访问'},
                    {value: 580, name: '邮件营销'},
                    {value: 484, name: '联盟广告'},
                    {value: 300, name: '视频广告'}
                ],
                emphasis: {
                    itemStyle: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                },
                itemStyle: {
                    borderWidth: 1,
                    borderColor: '#ffffff'
                },
                label: {
                    show: true,
                    color: 'inherit'
                }
            }
        ]
    };

    myChart.setOption(option);
</script>
` `

Current Behavior

when pie legend icon="circle", series itemStyle influence it's size.

Expected Behavior

legend icon size keep it the same

Environment

OS: macOS Monterey
Browser: Chrome 96.0.4664.55
Framework Vue

Any additional comments?

No response

@echarts-bot echarts-bot bot added en This issue is in English pending We are not sure about whether this is a bug/new feature. labels Dec 24, 2024
@helgasoft
Copy link

cannot replicate with code provided.
pie.itemStyle does not have any size parameter. Legend circle icon size is controlled by itemWidth.
📌 please close issue if problem solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature.
Projects
None yet
Development

No branches or pull requests

2 participants