Version
5.1.1
Steps to reproduce
option = {
legend: {
formatter: '{a|{name}}',
textStyle: {
rich: {
a: {
width: 200
}
}
}
},
series: [
{
name: '访问来源',
type: 'pie',
data: [
{value: 1048, name: '搜索引擎{}'},
{value: 300, name: '视频广告'}
]
}
]
};
What is expected?
No space in the '{}'
What is actually happening?

And I have not found a work around yet.
Discuss
- Should the rich text delimiters (
{a|xxx}) only available in formatter field or also enabled in data?
I think we probably can not restrict the delimiters only available in formatter (consider formatter can be a function).
That is, if data contains '{a|xxx}', it also should be recognized as rich text delimiters.
- Should we provide escaping for rich text delimiters?
I think it should. And we should better provide a util method to escape delimiters in data.
Version
5.1.1
Steps to reproduce
What is expected?
No space in the '{}'
What is actually happening?
And I have not found a work around yet.
Discuss
{a|xxx}) only available informatterfield or also enabled in data?I think we probably can not restrict the delimiters only available in
formatter(consider formatter can be a function).That is, if data contains
'{a|xxx}', it also should be recognized as rich text delimiters.I think it should. And we should better provide a util method to escape delimiters in data.