mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-24 18:00:26 +00:00
优化Tooltip的formatter支持{.1}类型的通配符
This commit is contained in:
@@ -200,9 +200,10 @@
|
||||
* `{b}`为数据项名`serieData`的`name`,或者类目值(如折线图的`X`轴)。
|
||||
* `{c}`为数值。
|
||||
* `{d}`为百分比值,注意不带`%`号。
|
||||
* `{a1}`、`{b1}`、`{c1}`表示指定`index`为`1`的`serie`,`{a}`默认`index`为`0`的`serie`。
|
||||
* `{.1}`表示指定`index`为`1`的`serie`对应颜色的圆点。
|
||||
* `{a1}`、`{b1}`、`{c1}`中的`1`表示指定`index`为`1`的`serie`,`{a}`默认`index`为`0`的`serie`。
|
||||
* `{c1:2}`表示索引为`1`的`serie`的数据项的第`3`个数据(`index`为`2`)。
|
||||
* `{c1:2-2}`表示索引为`1`的`serie`的第`3`个数据项的第`3`个数据。
|
||||
* `{c1:2-2}`表示索引为`1`的`serie`的第`3`个数据项的第`3`个数据(一个数据项有多个数据)。
|
||||
* `{d1:2:f2}`表示单独指定了数值的格式化字符串为`f2`(不指定时用`numericFormatter`)。
|
||||
* 示例:`"{a}:{c}"`、`"{a1}:{c1:f1}"`、`"{a1}:{c1:1f1}"`
|
||||
* `titleFormatter`:提示框标题内容的字符串模版格式器。支持用 `\n` 换行。仅当`itemFormatter`生效时才有效。
|
||||
|
||||
Reference in New Issue
Block a user