VChart icon indicating copy to clipboard operation
VChart copied to clipboard

[Bug] react-vchart 中 TreemapChart 设置 label 没有生效

Open Taunzi opened this issue 1 year ago • 1 comments

Version

1.12.1

Link to Minimal Reproduction

使用方法如下

Steps to Reproduce

const toalSpecValue = {id: 'xxx', values: [{name: 'xxx', value: 123}]}

<TreemapChart categoryField='name' valueField='value' ref={total} data={totalSpecValue} title={{visible: true, text: '总体积'}} label={{ visible: true }} />

Current Behavior

只有色块,没有数据标签

Expected Behavior

数据标签正常展示 使用 VChart 组件加 spec 引用数据不会有这样的问题

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

Taunzi avatar Aug 29 '24 07:08 Taunzi

@Taunzi 没有默认注册 registerLabel 导致的,可以先手动注册一下

xile611 avatar Aug 29 '24 07:08 xile611