This document is applicable to users who have installed the FineVis Data Visualization plugin to learn plugin functions.
Version
Report Server Version | Plugin Version | Functional Change |
---|---|---|
11.0 | V1.0.0 | Added the lowest version requirement. |
11.0.16 | V1.18.1 | Added APIs related to 3D component roaming animation: getRoamAnimations, playRoamAnimations, and updateRoamAnimationAction. |
11.0.22 | V2.10.0 | Added a 3D component model animation API: getAnimationByName. |
V3.0.0 | Added 3D component view angle rotation control APIs: camera.playAutoRotation(), camera.pauseAutoRotation(), and camera.stopAutoRotation(). | |
V3.1.0 | Added APIs for getting/setting 3D scene view angle parameters information: camera.getState(), and camera.setState(). | |
V3.4.0 | Added an API for getting camera view angle parameters of the 3D component: getCameraPerspectiveByName. |
Click to view historical version updates. | ||||||||||||||||||
|
getDataLayers
API | getDataLayers() | To get all data layers of the 3D component. |
---|---|---|
Parameter | / | / |
Returned Value | DataLayer[] | interface DataLayer { /** * To display the layer or not. */ visible: boolean /** * To set the layer to be visible or hidden. */ setVisible: (visible: boolean) => void; } |
Example | You can get all data layers of a 3D component by using this API. duchamp.getWidgetByName("3D Component Name").getSeries(); | |
Application Example | / | |
Mobile Terminal | This API is not supported on mobile terminals. |
getDataLayerByName
API | getDataLayerByName() | To get a specific data layer of a 3D component. |
---|---|---|
Parameter | name: string | Data layer name, string |
Returned Value | DataLayer | interface DataLayer { /** * To display the current layer or not. */ visible: boolean /** * To set the layer to be visible or hidden. */ setVisible: (visible: boolean) => void; } |
Example | You can get the specific data layer of Layer 1 of a 3D component by using this API. duchamp.getWidgetByName("3D Component Name").getDataLayerByName("Layer 1"); | |
Application Example | / | |
Mobile Terminal | This API is not supported on mobile terminals. |
animateSceneTime
API | animateSceneTime( { from:number,( to:number, duration:number, }) | To set dynamic change of the scene time for custom model components. ![]() This API is supported in FVS Custom Model Components only. |
---|---|---|
Parameter | from:number to:number duration:number | from: the start time of the scene change, an integer starting from 0 and with no upper limit. to: the end time of the scene change, an integer which must be greater than the from value. duration: the time required for the scene change, measured in milliseconds (ms). |
Returned Value | / | / |
Example | The custom model animation starts at 14:00 on day one, and ends at 14:00 on day two, with a duration of 3 seconds:
You can enable cyclic variations based on the above scene: ![]() Currently, no API can be used to pause the scene time change.
| |
Application Example | ||
Mobile Terminal | This API is not supported on mobile terminals. |
getMeshByName
API | getWidgetByName(name) | Get the custom model object of a 3D component. |
---|---|---|
Parameter | name: string | object name of the model mesh |
Returned Value | Object | name: object name of the model mesh visible: visibility scaling: scaling ratio rotation: rotation angle position: position focus: focusing on model position |
Example | Example: You can get the scaling ratio of a model object by using this API.
| |
Application Example | / | |
Mobile Terminal | This API is not supported on mobile terminals. |

The following APIs – setVisible, setScaling, setRotation, setPosition, and focus – must be used after the model object is obtained.
setVisible
VIP | setVisible(visible:boolean) | To set the model object to be visible or not. ![]() |
---|---|---|
Parameter | visible: boolean | Visible or not, which is a boolean value. · true: visible · false: invisible |
Returned Value | void | void |
Example | Example: You can set a model object of a 3D component to be invisible by using this API.
| |
Application Example | / | |
Mobile Terminal | This API is not supported on mobile terminals. |
setScaling
API | setScaling(NumberArray3) | To set the scaling ratio of a model object. |
---|---|---|
Parameter | NumberArray3 | Scaling ratio value: [X, Y, Z] |
Returned Value | void | void |
Example | Example: You can set the scaling ratio of a component in a 3D component by using this API.
| |
Application Example | / | |
Mobile Terminal | This API is not supported on mobile terminals. |
setRotation
API | setRotation(NumberArray3) | To set the rotation angle of a model object. |
---|---|---|
PArameter | NumberArray3 | Rotation angle value: [X, Y, Z] |
Returned Value | void | void |
Example | Example: You can set the rotation angle of a model object in a 3D component by using this API.
| |
Application Example | / | |
Mobile Terminal | This API is not supported on mobile terminals. |
setPosition
API | setPosition(NumberArray3) | To set the position of a model object. |
---|---|---|
Parameter | NumberArray3 | Position value: [X, Y, Z] |
Returned Value | void | void |
Example | Example: You can set the position of a model object in a 3D component by using this API.
| |
Application Example | / | |
Mobile Terminal | This API is not supported on mobile terminals. |
focus
API | focus(options) | To set the fast focus option of a model object. You are allowed to set camera control parameters (distance, center point, and array) in V1.15.0 and later versions. |
---|---|---|
Parameter | options: { target: "top" | "bottom" | "left" |"right" | "front" | "back" | "center"; targetpos: (value: NumberArray3) => NumberArray3; viewRay: (value: NumberArray3) => NumberArray3; distance: (value: number) => number; } | 1. target: the camera focus position on the model (including the centers of the model's six faces and the volume center), which is set to top by default. 2. targetpos: to fine-tune the focus point coordinate based on the focus position. 3. viewRay: to change the view sight. ![]() The default view direction is determined by target. For example: · When the target value is top, bottom, front, or center, the view direction is diagonal downward along the y-z plane at 45°: [0, -1, 1]. · When the target value is left, the view direction is diagonal downward along the x-z plane at 45°, facing the left side: [1, -1, 0]. · When the target value is right, the view direction is diagonal downward along the x-z plane at 45°, facing the right side: [0, -1, 1]. 4. distance: to change the distance between a camera and a model. ![]() The default distance is determined by the size of the target face. If target is set to center, the distance depends on the overall size of the model object. |
Returned Value | void | void |
Example | Example 1: duchamp.getWidgetByName("Component Name").getMeshByName("Model Name").focus(); Example 2:
| |
Application Example | ||
Mobile Terminal | This API is not supported on mobile terminals. |
refreshData
API | refreshData() | To refresh 3D component data while keeping the entire component unchanged. ![]() In V1.17.1 and earlier versions, only FVS Custom Model Components and FVS 3D City Scene Components are supported. |
---|---|---|
Parameter | {para:"para"} | Parameter name: parameter value |
Returned Value | / | / |
Example | Example one: You can click the data of the component Custom Model to pass parameters.
![]() The following text shows the syntax for passing multiple parameters. duchamp.getWidgetByName("Component").refresh({a:"parameter a", b:"parameter b"}); Example two: You can add a Page Loading End Event for the template to refresh the data of a 3D component periodically. duchamp.getWidgetByName("Component").refresh({a:"parameter a", b:"parameter b"}); | |
Application Example | / | |
Mobile Terminal | This API is not supported on mobile terminals. |
subscribeMarkerData
API | subscribeMarkerData((data, observer)) | To subscribe to monitoring data updates in the data layer of a 3D component: When the data in the data layer is updated or new data is generated, the callback is executed. ![]() 1. This function should be used together with the refresh API. 2. Only FVS Custom Model Components and FVS 3D City Scene Components are supported. |
---|---|---|
Parameter | subscribeMarkerData(observer: (data: { [key: string]: any }, observer: {unsubscribe: () => {}}) => void): void; | · data is a dictionary type, and its content depends on the configuration of the data layer. · key is a selected field name in a dataset, and value is the corresponding value of the selected field. · unsubscribe is a function used to cancel the subscription to monitoring. |
Returned Value | / | / |
Example | Example: You can control the visibility of the model based on the fields in the database table.
| |
Application Example | / | |
Mobile Terminal | This API is not supported on mobile terminals. |
updateMarkerData
API | updateMarkerData((data)) | To update the data of a specified model object in the 3D component data layer. ![]() Note: Only FVS Custom Model Components and FVS 3D City Scene Components are supported. |
---|---|---|
Parameter | updateMarkerData(predicate: (data) => boolean, updater: (data) => void); | · predicator is the query function used to determine whether a data item needs to be updated. If the return value is true, an update is required. · updator is the update function used to update data verified by predicator with the returned value true. |
Returned Value | / | / |
Example | Example: You can update multiple label values of the specified model object in the Vehicle Monitoring data layer of the Parking Lot Model by using this API.
| |
Application Example | You can use a text box widget to input the corresponding vehicle ID and parking duration. The model data will be updated accordingly after the editing. (The parking lot model triggers a red alert when parking duration exceeds 10 hours.) The following figure shows the effect. For details, you can download the template Updating Specific Model Data by JS.fvs | |
Mobile Terminal | This API is not supported on mobile terminals. |
getRoamAnimations
API | getRoamAnimations() | To get all roaming path information (the roaming path name by now) of a 3D component. ![]() Only FVS Custom Model Components and FVS 3D City Scene Components are supported. |
---|---|---|
Parameter | / | / |
Returned Value | RoamAnimationsData[] | interface RoamAnimationsData{ |
Example | Example: You can get the roaming path information of a Custom Model component by using this API. duchamp.getWidgetByName("Custom Model").getRoamAnimations(); | |
Application Example | / | |
Application Example | This API is not supported on mobile terminals. |
playRoamAnimations
API | playRoamAnimations() | To play the roaming animation. ![]() Only FVS Custom Model Components and FVS 3D City Scene Components are supported. |
---|---|---|
Parameter | RoamAnimationOptions | type RoamAnimationOptions = { |
Returned Value | / | / |
Example | Example one: You can add a click event to the title component to play the Roaming Path one animation of the Custom Model component by using this API.
Example two: You can write code in the Add Page End Event to automatically play the roaming animation after the page has finished loading.
| |
Application Example | / | |
Mobile Terminal | This API is not supported on mobile terminals. |
updateRoamAnimationAction
API | updateRoamAnimationAction() | To pause/continue/exit the roaming animation. |
---|---|---|
Parameter | "pause"|"continue"|"exit" | "pause": to pause the roaming animation. "continue": to continue the roaming animation. "exit": to exit the roaming animation. |
Returned Value | / | / |
Example | Example one: You can pause the roaming animation of the Custom Model component. duchamp.getWidgetByName("Custom Model").updateRoamAnimationAction("pause"); Example two: You can continue the roaming animation of the Custom Model component. duchamp.getWidgetByName("Customer Model").updateRoamAnimationAction("continue"); Example three: You can exit roam animation of the Custom Model component. duchamp.getWidgetByName("Custom Model").updateRoamAnimationAction("exit"); | |
Application Example | / | |
Mobile Terminal | This API is not supported on mobile terminals. |
getAnimationByName
API | getAnimationByName("animationName") | To get the animation objects of a 3D component. |
---|---|---|
Parameter | animationName | Name of the animation The name corresponds to the animations[index].name obtained by getMeshByName. ![]() |
Returned Value | / | / |
Example | You can obtain the 1. Explosion animation of the SMT Pick-and-Place Machine Explosion Reset model in 3D Custom Scene 1_Page 1.by using this API.
You can start playing 1. Explosion animation by using this API.
You can stop playing 1. Explode animation by using this API. animation.pause() You can end playing 1. Explode animation by using this API.
| |
Application Example | / | |
Mobile Terminal | This API is not supported on mobile terminals. |
camera.playAutoRotation()
API | camera.playAutoRotation(speed) | To start/continue the camera view rotation of a 3D component. ![]() |
---|---|---|
Parameter | speed | Rotation speed |
Returned Value | / | / |
Example | Example: You can start/continue the view rotation of 3D Custom Scene 1_Page 1, with a rotation speed of 15 by using this API. duchamp.getWidgetByName("3D Custom Scene 1_Page 1").camera.playAutoRotation(15) | |
Application Example | / | |
Mobile Terminal | This API is not supported on mobile terminals. |
camera.pauseAutoRotation()
API | camera.pauseAutoRotation() | To pause the view rotation of a 3D component. ![]() You are advised to use this API after disabling the component hover, otherwise the view rotation may be affected by the hover interaction. |
---|---|---|
Parameter | / | / |
Returned Value | / | / |
Example | Example: You can pause the view rotation of 3D Custom Scene 1_Page 1 by using this API. duchamp.getWidgetByName("3D Custom Scene 1_Page 1").camera.pauseAutoRotation() | |
Application Example | / | |
Mobile Terminal | This API is not supported on mobile terminals. |
camera.stopAutoRotation()
API | camera.stopAutoRotation(isInitial) | To pause the view rotation of a 3D component. ![]() You are advised to use this API after disabling the component hover, otherwise the view rotation may be affected by the hover interaction. |
---|---|---|
Parameter | isInitial: boolean | To reset to initial view or not, which is a boolean value. · true: to reset the view to the initial view. · false: not to reset the view to the initial view. |
Returned Value | / | / |
Example | Example: You can pause the view rotation of 3D Custom Scene 1_Page 1 by using this API. duchamp.getWidgetByName("3D Custom Scene 1_Page 1").camera.stopAutoRotation(true) | |
Application Example | / | |
Mobile Terminal | This API is not supported on mobile terminals. |
camera.getState
API | camera.getState() | To get the view angle parameter information of a 3D Scene. |
---|---|---|
Parameter | / | / |
Returned Value | position: number target: number | position: camera coordinate target: viewpoint coordinate |
Example | Example: You can get the view point parameter information of 3D Custom Scene 1_Page 1 by using this API. duchamp.getWidgetByName("3D Custom Scene 1_Page 1").camera.getState() | |
Application Example | / | |
Mobile Terminal | This API is not supported on mobile terminals. |
camera.setState
API | camera.setState( { position:number, target:number, duration:number, }) | To set the view point parameter information of a 3D scene. |
---|---|---|
Parameter | position:number target:number duration:number | position: camera coordinate target: viewpoint coordinate duration: Animation transition time, optional, with a default value of 2000 (milliseconds). |
Returned Value | / | / |
Example | Example: You can set the viewpoint parameter information of 3D Custom Scene 1_Page 1 by using this API.
| |
Application Example | / | |
Mobile Terminal | This API is not supported on mobile terminals. |
getCameraPerspectiveByName
API | getCameraPerspectiveByName(name) | To get the corresponding view point parameter information by camera view name. |
---|---|---|
Parameter | name: string | Viewing angle name |
Returned Value | position: NumberArray3 target: NumberArray3 | position: camera coordinate target: viewpoint coordinate |
Example | Example: You can get the view point parameter information of View Point one of component 3D Custom Scene 1_Page 1 by using this API.
| |
Application Example | / | |
Mobile Terminal | This API is not supported on mobile terminals. |