You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何移除Kendo React饼图中数据标签与扇区间的连线

解决Kendo React饼图移除标签与扇区连线的方案

要移除饼图数据标签和扇区之间的连线,只需在labels配置中添加connectors属性并设置其visible为false即可,具体修改如下:

修改后的代码示例:

<Chart transitions={false} style={{ height: '100%', width: '50%' }}>
    <ChartLegend visible={false} />
    <ChartTitle text={resource.Occupied} />
    <ChartSeries>
        <ChartSeriesItem
            labels={{
                visible: true,
                align: 'center',
                distance: 10,
                // 添加这行配置隐藏连线
                connectors: { visible: false }
            }}
            type='pie'
            tooltip={{
                visible: true,
            }}
            data={data}
            categoryField='Field'
            field='Value'
        />
    </ChartSeries>
</Chart>

这个配置会保留显示数据标签,但完全隐藏标签与饼图扇区之间的连线,正好符合需求。

内容的提问来源于stack exchange,提问作者JD333

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.11 18:42:02