[Feature] lengend formatter support value
What problem does this feature solve?
当前 legend 的 formatter 只支持图例名称 name 参数,不支持 value
legend.formatter params only support name, not support value
What does the proposed API look like?
// 使用字符串模板,模板变量为图例名称 {name}
formatter: 'Legend {name}: {value}'
// 使用回调函数
formatter: function (name, value) {
return 'Legend ' + name + ':' + value;
}
@showmethecode9527 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
TRANSLATED
BODY
What problem does this feature solve?
Current 'formatter' of 'legend' only supports the legend name 'name' parameter, not 'value'
legend.formatter params only support name, not support value
What does the proposed API look like?
Use a string template with the template variable as the legend name {name}
formatter: 'Legend {name}: {value}'
Use callback functions
formatter: function (name, value) {
return 'Legend ' + name + ':' + value;
}
同样有这样的需求,希望legend可以拿到对应行的值,类似pie.label的formatter。以实现饼图在显示区域不够宽时,可以借助通过legend代替label进行更复杂的表达。
would like to see this as well!
lengend 不支持 色块 和 文字 反转位置, 不支持 按 线性样式 等其他元素标示吗?
This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.
This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!