addEffect
Method | addEffect(type, opts) | A tooltip appears when the mouse hovers over a cell |
---|---|---|
Parameter | type: string, opts: { address: string, text: string, image: string } | type:tooltip type,string
opts:tooltip attributes,json format 1)address:Cell address,string,such as 'A1' 2)text:Tooltip content,string 3)image:Picture URL path,string,Picture format support png、jpg. The image source can be a web page image, such as:
You can also place the picture in the report project directory %FR_HOME%\webapps\webroot and access it through URL. like:
Note: When the image and text attributes exist at the same time, only the text attribute takes effect. |
Return value | void | |
Example | Refer to example chapter | |
Application example | A tooltip box appears when the mouse hovers over cell A1, and the tooltip content is "OrderID10001": See the Examples section for more examples. | |
Mobile | Support mobile terminal |
The following content is an example of the interface, divided into text tooltip and picture tooltip, corresponding to the two values of the type parameter.
1. Code example
Example 1: If the obtained report block object is defined as report , a tootltip box will appear when the mouse hovers over cell A2, and the tooltip content is "OrderID10001"
Example 2: In a general report, a tootltip box appears when the mouse hovers over cell A2, and the tooltip content is "OrderID10001":
Example 3: In the dashboard, when the mouse hovers over the cell A2 of the report0 report block, a tooltip box appears, and the tooltip content is "OrderID10001":
Example 4: If the obtained report block object is defined as report , the words FanRuan log will appear when the mouse hovers over cell A2:
Example 5: In a general report, the words FanRuan log appear when the mouse hovers over cell A2:
Example 6: In the dashboard, the words FanRuan log appear when the mouse hovers in cell A2:
2. Application example
Example 1: A tooltip box appears when the mouse hovers over cell A2, and the tooltip content is "Order ID10001"
Click to download the template:
Mouse hover cell text tooltip appear.cpt
Example 2: The word FanRuan log appears when the mouse hovers in cell A2
Click to download the template: