增加Tooltipformatter{.}{c:0}{c1:1}的支持

This commit is contained in:
monitor1394
2020-04-23 13:07:49 +08:00
parent cc5c5d3078
commit 9e3e569396
9 changed files with 343 additions and 61 deletions

View File

@@ -190,7 +190,7 @@
* `Shadow`:阴影指示器。
* `None`:无指示器。
* `Corss`十字准星指示器。坐标轴显示Label和交叉线。
* `formatter`:提示框内容字符串模版格式器。支持用 `\n``<br/>` 换行。当`formatter`不为空时,优先使用`formatter`,否则使用`itemFormatter`。示例:`{a}:{c}``{a1}:{c1:f1}`。其中变量 `{a}`, `{b}`, `{c}`, `{d}` 在不同图表类型下代表数据含义为:
* `formatter`:提示框内容字符串模版格式器。支持用 `\n``<br/>` 换行。当`formatter`不为空时,优先使用`formatter`,否则使用`itemFormatter`。示例:`{a}:{c}``{a1}:{c1:f1}`。其中`{.}`表示带动态颜色的圆点;`{c:0}``{c1:1}`表示索引为0、1的serie的数据项的第0、第1个数据其它变量 `{a}`, `{b}`, `{c}`, `{d}` 在不同图表类型下代表数据含义为:
* 折线区域图、柱状条形图、K线图 : `{a}`(系列名称),`{b}`(类目值),`{c}`(数值), `{d}`(无)。
* 散点图(气泡)图 : `{a}`(系列名称),`{b}`(数据名称),`{c}`(数值数组), `{d}`(无)。
* 地图 : `{a}`(系列名称),`{b}`(区域名称),`{c}`(合并数值), `{d}`(无)。