apache / apache/echarts

[Feature] Hope "tooltip" supports "rich". 希望“tooltip”支持“rich”

オープン
#17,543 コメント 5 件 リアクション 2 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
67.3k
フォーク
19.8k
平均マージ
11日 14時間
マージ済み PR(30日)
8

説明

### What problem does this feature solve?

目前`tooltip`不支持`rich`,`renderMode:'richText'`似乎是一个没用的选项,在没有dom的微信小程序里,没办法自定义不同的样式。
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.
```js
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`

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、WeChat mini-program/no-DOM renderer で tooltip's renderMode:'richText' パスが formatter の出力をどのように消費するかを追跡します。選択した tooltip.rich または tooltip.textStyle.rich API が {name|...} および {value|...} の出力に名前付きスタイルを適用することを検証し、例で異なる色がレンダリングされることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, typescript
領域
data-visualization
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。