echarts
echarts copied to clipboard
[Feature] Hope "tooltip" supports "rich". 希望“tooltip”支持“rich”
What problem does this feature solve?
目前tooltip
不支持rich
,renderMode:'richText'
似乎是一个没用的选项,在没有dom的微信小程序里,没办法自定义不同的样式。
Currently, rich
is not supported bytooltip
, andrenderMode:'richText'
seems to be a useless option. In wechat applets without DOM, there is no way to customize different styles.
option = {
tooltip: {
renderMode: 'richText',
formatter({ name, value }) {
return `{name|${name}}:{value|${value}}`;
},
// invalid 无效
rich: {
name: { color: 'red' },
value: { color: 'blue' }
},
textStyle: {
// invalid 无效
rich: {
name: { color: 'red' },
value: { color: 'blue' }
}
}
},
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
{
data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar'
}
]
};
What does the proposed API look like?
tooltip.rich
or
tooltip.textStyle.rich
@leekbillow 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
TITLE
[Feature] Hope "tooltip" supports "rich". Hope "tooltip" supports "rich"
BODY
What problem does this feature solve?
Currently tooltip
does not support rich
, renderMode:'richText'
seems to be a useless option, in WeChat applet without dom, there is no way to customize different styles.
Currently, rich
is not supported by tooltip
, and renderMode:'richText'
seems to be a useless option. In wechat applets without DOM, there is no way to customize different styles.
option = {
tooltip: {
renderMode: 'richText',
formatter({ name, value }) {
return `{name|${name}}:{value|${value}}`;
},
// invalid is invalid
rich: {
name: { color: 'red' },
value: { color: 'blue' }
},
textStyle: {
// invalid is invalid
rich: {
name: { color: 'red' },
value: { color: 'blue' }
}
}
},
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
{
data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar'
}
]
};
What does the proposed API look like?
tooltip.rich
or
tooltip.textStyle.rich
tooltip
does suppot richText
I have the same problem