antvis / G2

📊 The concise and progressive visualization grammar.
https://g2.antv.antgroup.com
MIT License
12.11k stars 1.59k forks source link

图例 legend 配置问题 #5346

Open leon9508 opened 1 year ago

leon9508 commented 1 year ago

1、给图例添加background只会应用在第一个图例上面; 2、无法自定义设置radio的大小及图形样式; 3、radio的大小会随itemHeight的值而变动,而希望设置itemHeight和radio大小不要关联。

image
leon9508 commented 1 year ago

@pearmini 可以给看下这个问题吗

hustcc commented 1 year ago

这个是 G2Plot 吗?issue 中描述一下库以及版本,然后代码贴上可以复制的文本。

leon9508 commented 1 year ago

不是G2Plot,就是g2的4.x 版本,地址: https://g2-v4.antv.vision/zh/examples/line/basic#curved

leon9508 commented 1 year ago

增加的代码是: chart.legend({ radio: { style: { fill: '#ff0' } }, background: { style: { fill: '#f00', strokeOpacity: 0, } }, itemHeight: 30 })

leon9508 commented 1 year ago

@hustcc 辛苦给看下~多谢啦