This commit is contained in:
monitor1394
2022-06-16 08:14:02 +08:00
parent 87049b5170
commit 431cf7de74
11 changed files with 44 additions and 29 deletions

View File

@@ -1361,8 +1361,8 @@ Tooltip component.
| `show` |true | Whether to show the tooltip component. |
| `type` | | Indicator type.</br>`Painter.Type`:</br>- `Base`: </br>- `Serie`: </br>- `Top`: </br>|
| `trigger` | | Type of triggering.</br>`Tooltip.Trigger`:</br>- `Item`: Triggered by data item, which is mainly used for charts that don't have a category axis like scatter charts or pie charts.</br>- `Axis`: Triggered by axes, which is mainly used for charts that have category axes, like bar charts or line charts.</br>- `None`: Trigger nothing.</br>|
| `itemFormatter` | | a string template formatter for a single Serie or data item content. Support for wrapping lines with \n. When formatter is not null, use formatter first, otherwise use itemFormatter. |
| `titleFormatter` | | The string template formatter for the tooltip title content. Support for wrapping lines with \n. The placeholder {I} can be set separately to indicate that the title is ignored and not displayed. Template variables are {.}, {a}, {b}, {c}, {d}.</br> {.} is the dot of the corresponding color of a Serie that is currently indicated or whose index is 0.</br> {a} is the series name of the serie that is currently indicated or whose index is 0.</br> {b} is the name of the data item serieData that is currently indicated or whose index is 0, or a category value (such as the X-axis of a line chart).</br> {c} is the value of a Y-dimension (dimesion is 1) from a Serie that is currently indicated or whose index is 0.</br> {d} is the percentage value of Y-dimensions (dimesion is 1) from serie that is currently indicated or whose index is 0, with no % sign.</br> {e} is the name of the data item serieData that is currently indicated or whose index is 0.</br> {f} is sum of data.</br> {.1} represents a dot from serie corresponding color that specifies index as 1.</br> 1 in {a1}, {b1}, {c1} represents a serie that specifies an index of 1.</br> {c1:2} represents the third data from serie's current indication data item indexed to 1 (a data item has multiple data, index 2 represents the third data).</br> {c1:2-2} represents the third data item from serie's third data item indexed to 1 (i.e., which data item must be specified to specify).</br> {d1:2: F2} indicates that a formatted string with a value specified separately is F2 (numericFormatter is used when numericFormatter is not specified).</br> {d:0.##} indicates that a formatted string with a value specified separately is 0.## (used for percentage, reserved 2 valid digits while avoiding the situation similar to "100.00%" when using f2 ).</br> Example: "{a}, {c}", "{a1}, {c1: f1}", "{a1}, {c1:0: f1}", "{a1} : {c1:1-1: f1}"</br> |
| `itemFormatter` | | a string template formatter for a single Serie or data item content. Support for wrapping lines with \n. Template variables are {.}, {a}, {b}, {c}, {d}.</br> {.} is the dot of the corresponding color of a Serie that is currently indicated or whose index is 0.</br> {a} is the series name of the serie that is currently indicated or whose index is 0.</br> {b} is the name of the data item serieData that is currently indicated or whose index is 0, or a category value (such as the X-axis of a line chart).</br> {c} is the value of a Y-dimension (dimesion is 1) from a Serie that is currently indicated or whose index is 0.</br> {d} is the percentage value of Y-dimensions (dimesion is 1) from serie that is currently indicated or whose index is 0, with no % sign.</br> {e} is the name of the data item serieData that is currently indicated or whose index is 0.</br> {f} is sum of data.</br> {.1} represents a dot from serie corresponding color that specifies index as 1.</br> 1 in {a1}, {b1}, {c1} represents a serie that specifies an index of 1.</br> {c1:2} represents the third data from serie's current indication data item indexed to 1 (a data item has multiple data, index 2 represents the third data).</br> {c1:2-2} represents the third data item from serie's third data item indexed to 1 (i.e., which data item must be specified to specify).</br> {d1:2: F2} indicates that a formatted string with a value specified separately is F2 (numericFormatter is used when numericFormatter is not specified).</br> {d:0.##} indicates that a formatted string with a value specified separately is 0.## (used for percentage, reserved 2 valid digits while avoiding the situation similar to "100.00%" when using f2 ).</br> Example: "{a}, {c}", "{a1}, {c1: f1}", "{a1}, {c1:0: f1}", "{a1} : {c1:1-1: f1}"</br> |
| `titleFormatter` | | The string template formatter for the tooltip title content. Support for wrapping lines with \n. The placeholder {I} can be set separately to indicate that the title is ignored and not displayed. Template see itemFormatter. |
| `marker` | | the marker of serie. |
| `fixedWidth` |0 | Fixed width. Higher priority than minWidth. |
| `fixedHeight` |0 | Fixed height. Higher priority than minHeight. |