This document is applicable to users who have installed the FineVis Data Visualization plugin to learn plugin functions.
Version
Report Server Version | JAR Package | Plugin Version | Functional Change |
---|---|---|---|
11.0 | 2021-11-15 | V1.0.0 | Required that your version must be higher than or equal to this lowest version. |
Index
Global API
Global APIs are mainly used for the FVS template. For details, see Global API - FR.
API | Description |
---|---|
duchamp | Get the component object from the FVS template. It can be used in conjunction with the methods applicable to that object. |
servletURL | Get servletURL. |
serverURL | Get serverURL. |
server | Get server. |
fineServletURL | Get fineServletURL. |
SessionMgr.getSessionID | Get sessionID. |
showDialog | Open a dialog box. |
closeDialog | Close a dialog box. |
doHyperlinkByGet | Open a webpage by the GET method, on which you can establish parameter linkage and set page attributes. |
doHyperlinkByPost | Open a webpage by the POST method, on which you can establish parameter linkage and set page attributes. |
Msg | Open the built-in message box of FineReport (with a unified style), which can replace the alert, confirm, prompt, and toast pop-up boxes in Windows. For details, see FR.Msg. |
remoteEvaluate | Execute FineReport built-in formulas and get the calculation result. |
jsonEncode | Encode the string using jsonEncode. |
jsonDecode | Decode the string using jsonEncode. |
ajax | It is an encapsulated jQuery.ajax() function. For details, see FR.ajax. |
isEmpty | Check if the object is empty. |
isArray | Check if the object is an array. |
cellStr2ColumnRow | Get row and column indexes based on the cell number. |
columnRow2CellStr | Get the cell number based on the row and column number. |
exportTemplate | Export FVS templates. For details, see FVS Template Export. |
The following table introduces interfaces used for the FS object.
API | Description |
---|---|
signOut | Log out of the decision-making platform, namely returning to the platform login page. |
tabPane.closeActiveTab | Close the tab page of the decision-making platform, namely automatically closing the template previewed in the platform. |
tabPane.addItem | Open a new tab page in the decision-making platform. |
Page API
FVS page APIs are mainly used to obtain component objects from the page and page-related interfaces. The following table shows the APIs. For details, see FVS Page Interface.
API | Description | Note |
---|---|---|
this | Get the current component object. It can be used in conjunction with the methods and properties of that object. | |
getWidgetByName | Get a specific component from the current page. | |
refresh | Trigger the component refresh. In FVS V1.9.1 and later versions, it also supports parameter passing while triggering the refresh. | |
trigger | Trigger all click events of the component. | |
requestFullscreen | Trigger the full-screen mode. | |
exitFullscreen | Exit the full screen, only valid for the full-screen effect triggered by the requestFullscreen interface, not for that triggered by F11. | |
reload | Trigger an automatic refresh of a whole template. | |
setPageButtonDisplayPolicy | Set whether to display the page switching button. | |
linkageGlobal | Implement global parameter linkage. | |
getPage | Get a page through the page index or the page name. | Unified FVS APIs related to template pages, table component pages, and tab pages. For details about historical APIs, see |
getPreviousPage | Get the previous page. | |
getNextPage | Get the next page. | |
getFirstPage | Get the first page. | |
getLastPage | Get the last page. | |
getCurrentPage | Get the current page. | |
getAllPages | Get all pages. | |
setVisible | Set the visibility of the page. | |
isVisible | Get the visibility state of the page. | |
goto | Go to the gotten page. | |
getName | Get the page name. | |
getIndex | Get the page index. |
3D Component API
The following table introduces the FVS 3D component APIs.
API | Description |
---|---|
getDataLayers | Get all data layers of a 3D component. |
getDataLayerByName | Get a specific data layer of a 3D component. |
animateSceneTime | Set the scene time of a custom model to dynamically change, only valid for custom 3D scene components. |
getMeshByName | Search for model objects based on the mesh name of a custom model and perform some operations on the model according to its properties. |
setVisible | Set whether a model object is visible after obtaining it through getMeshByName. |
setScaling | Set the scaling ratio of a model object after obtaining it through getMeshByName. |
setRotation | Set the rotation angle of a model object after obtaining it through getMeshByName. |
setPosition | Set the position of a model object after obtaining it through getMeshByName. |
focus | Set a model object to focus quickly after obtaining it through getMeshByName. |
rotateTo rotateTo scaleTo moveTo | Set motion effects such as the angle, orientation, scale, and position of a model object after obtaining it through getMeshByName. |
refreshData | Pass parameters and refresh the data of a 3D component. |
subscribeMarkerData | Subscribe to monitor data updates of 3D component data layers. It should be used with the refreshData interface. |
updateMarkerData | Update the data of a specified model object in the 3D component data layer separately. |
getRoamAnimations | Get all roaming path information of a 3D component (currently only returns the roaming path name). |
playRoamAnimations | Play the roaming animation. |
updateRoamAnimationAction | Pause/Continue/Exit the roaming animation. |
getAnimationByName | Get the animation object of the 3D component, and start/play/end the animation. |
Widget API
The FVS widget APIs are listed and described in the following table. For details, see General APIs for Widgets.
API | Description |
---|---|
getValue | Get the actual value of widgets. Note: In FVS V1.16.0 and later versions, it can be used for the title component. |
getText | Get the display value of widgets. |
setValue | Set the value of widgets. Note: In FVS V1.16.0 and later versions, it can be used for the title component. |
setVisible | Set the component to be visible/invisible (valid for all components). |
isVisible | Return the component to be visible/invisible (valid for all components). |
setEnable | Set widgets enabled/disabled. |
isEnabled | Indicate whether a widget is usable or unusable. |
reset | Clear widget content to reset it. |
setWaterMark | Add watermark text (Only widgets with input boxes are supported.). |
setMaxAndMinDate | Set the selectable time range of the date widget (only for the date widget). |
Table Component API
Table APIs are used to modify the properties of table components.
1. Table object APIs are used to locate cells in table components and set basic table properties.
API | Description |
---|---|
getCell(row,col) | Get a cell object of the row-th row and col-th column of the table. |
getRow(index) | Get all cell objects of the index row of the table. |
getColumn(index) | Get all cell objects of the index column of the table. |
getRowCount() | Get the total number of rows after expansion in a Table. |
getColumnCount() | Get the total number of columns after expansion in a table. |
onMouseClick(func) | Bind the click/tap events. The bound event is triggered when the table component is clicked or tapped. |
onMouseMoveInCell(func) | Bind the cursor or finger move-in events. The bound event is triggered when the cursor/finger enters the cell. |
onMouseMoveOutCell(func) | Bind the cursor or finger move-out events. The bound event is triggered when the cursor/finger moves out of the cell. |
scrollTo(opts) | Set the table to automatically scroll to a certain position. |
getScrollOffset() | Get the scroll offset of the table. |
setRadius(radius, range, single) | Set rounded corners for all cells in the table. The cell must be set with the background color, otherwise the effect cannot be seen. |
showToolTip(opts) | Set tooltips for all cells in the table. |
2. Table row/column APIs are mainly used for rows and columns in table components to set table row and column properties.
API | Description |
---|---|
setHeight(height) | Set the cell row height. |
getHeight() | Get the cell row height |
setWidth(width) | Set the column width of cells. |
getWidth() | Get the cell column width |
getCell() | Get the cell object on the row-th row of a certain column or the cell object on the col-th column of a certain row. |
getIndex() | Get the position index of the cell row object/cell column object. |
setStyle(opts) | Set the style of a cell row/column object. |
showToolTip(opts) | Add tooltips to cell rows/columns. |
3. Table cell APIs are mainly used for cells in table components to set the cell properties.
API | Description |
---|---|
getPosition() | Get the current cell position, requiring you to get the cell object first. |
getRow() | Get the row object where the current cell is located. |
getColumn() | Get the column object where the current cell is located. |
getValue() | Get the value of a cell. |
showToolTip(opts) | Add tooltips to a cell. |
setStyle(opts) | Set the cell style. |
Style attribute style is used in JS APIs with style parameters, following the CSS specifications, used to set styles such as border, background, color, and text.
4. The API for exporting tables can solely export table components as Excel files. For details, see Report Export API.
API | Description |
---|---|
exportReportToExcel | Export a table component as an Excel file. |
5. The following API is used to change the background color of a cell or the corresponding row/column when you click the cell or hover the cursor over it.
API | Description |
---|---|
addEffect(type, opts) | The background color of the cell or the corresponding row/column changes when you click the cell or hover the cursor over it. |
6. Marquee API For details, see Marquee API.
API | Description |
---|---|
startMarquee | Enable the marquee effect for a table component. |
stopMarquee | Disable the marquee effect of a table component. |
7. Page API
Unified FVS APIs related to template pages, table component pages, and tab pages. Table page APIs are consistent with the APIs in section "Page API."
Chart Component API
The FVS chart component APIs are listed and described in the following table.
Note: The following APIs do not support extended charts.
API | Description |
---|---|
getSeries() | Get series array of a chart component. |
series[seriesIndex] | Get the series object of a chart component. |
series.points | Get the data point object of a series after getting a chart series object. |
setSeriesVisible() | Display some series on a chart. |
sortChart() | Sort data in a chart. |
openAutoTooltip() | Display tooltips of data points on a chart in turn. Note: This API supports extended charts except for carousel-type charts. |
setMapZoom() | Set the scale level and the center point of a map. |
getZoom() | Set the scale level of a map. |
getCenter() | Get the center point of a map. |
panTo() | Change the center point of a map. |
drillDown() | Drill down on a map. |
drillUp() | Drill up on a map. |
getLayerIndex() | Get the current drill hierarchy of a drill map, with levels starting from 0. |
getLayerNames() | Get the name array of a drill directory, such as ["America", "State of New York", "New York City"]. |
Iframe API
FVS Iframe APIs are used for the communication between FVS Iframes and the template page.
API | Description |
---|---|
onlyCommunicateWithOrigins | Specify the origins for communication with FVS before communication, without which the communication cannot be performed. |
postMessage | Send a message. |
Remove the listener added by addPostMessageListener. | Monitor the messages from the Iframe (specified by origins). |
removePostMessageListener | Remove the listener added by addPostMessageListener. |
APIs Only for the Mobile Terminal
In the DataAnalyst app V11.0.91 and later versions with the FineVis Data Visualization plugin V2.6.0 and later versions, the following APIs are supported. For details, see API Only for Mobile Terminals.
API | Description |
---|---|
FS.tabPane.closeActiveTab | Close the current page and go to the directory page. |
FS.tabPane.addItem | Open a new page. |
logoutApp | Log out of the app. |
location | Obtain the latitude and longitude by the positioning function. |
getDeviceInfo | Get information about the current devise. |