JSBarGraph
API for creating and configuring 2D bar graph objects.
Create a API with Module.createBarGraph.
var object = Module.createBarGraph("ID");
Function
getId() → string
Returns the object's Key.
Return
string: Successful return of the object's Key string.
null: If the object is null.
create(position, size, type) → boolean
Creates a 2D bar graph object.
Visualization changes based on the type input value.
0: horizontal graph form.
1: vertical graph form.
position
Graph location (based on the bottom center point) coordinates (longitude, latitude, altitude).
type
number
Graph type setting
Return
true : Object creation successful.
false : Object creation failed.
Sample
Refer to the createGraph function.
restartAnimation(restartRate) → boolean
Restarts the graph animation.
restartRate
number
Animation start step (values between 0.0~1.0, where 0.0 is the animation start point, and 1.0 is the end point).
Return
true : Execution successful.
false : If the object is not initialized or does not exist.
setValueRange(min, max, interval) → boolean
Sets the Y-axis range of the graph.
min
number
Minimum value on the Y-axis of the graph.
max
number
Maximum value on the Y-axis of the graph.
interval
number
Grid interval of the graph.
Return
true : Object setting successful.
false : Object setting failed.
Sample
Refer to the createGraph function.
setAnimationSpeed(speed) → boolean
Sets the animation playback speed of the graph.
The speed input value should be between 0.1 ~ 1.0, with values closer to 1.0 playing back faster.
speed
number
Graph animation playback speed
Return
true : Object setting successful.
false : Object setting failed.
Sample
Refer to the createGraph function.
setFloorColor(color) → boolean
Sets the color of the graph's floor plane.
Return
true : Object setting successful.
false : Object setting failed.
Sample
Refer to the createGraph function.
setLegendBoxSize(size) → boolean
Sets the size of the legend color display box.
Return
true : Object setting successful.
false : Object setting failed.
Sample
Refer to the createGraph function.
setUnitText(text) → boolean
Sets the unit text of the Y-axis of the graph.
text
string
Unit text.
Return
true : Object setting successful.
false : Object setting failed.
Sample
Refer to the createGraph function.
setGridVisible(type) → boolean
Sets the visibility of the Y-axis and grid.
type
boolean
true for Y-axis grid visibility(RTT). false to hide the Y-axis grid.
Return
true : Object setting successful.
false : Object setting failed.
insertLegend(name, label, color) → boolean
Adds a legend to the graph.
Return
true: Addition successful.
false: Addition failed.
Sample
Refer to the createGraph function.
insertDataSet(name, data) → boolean
Adds a data set to the graph.
name
string
Data set name (displayed as text at the bottom of the graph).
data
List of data values (follows the order of legend addition, corresponding 1:1 with the legend).
Return
true: Addition successful.
false: Addition failed.
Sample
Refer to the createGraph function.
setDataSetNameFont(name, font) → boolean
Sets the font for the data set name text.
name
string
Data set name.
font
string
Font name.
Return
true : Font setting successful.
false : Font setting failed.
Sample
Refer to the createGraph function.
setDataSetNameTextSize(name, size) → boolean
Sets the text size for the data set name.
name
string
Data set name.
size
number
Text size.
Return
true : Text size setting successful.
false : Text size setting failed.
Sample
Refer to the createGraph function.
setDataSetNameTextColor(name, textcolor, textOutlineColor) → boolean
Sets the text color for the data set name.
Return
true : Text color setting successful.
false : Text color setting failed.
Sample
Refer to the createGraph function.
setDataSetNameInterval(value) → boolean
Sets the spacing between the graph display and the field name text.
value
number
The spacing between the graph display and the field name text.
Return
true : Spacing setting successful.
false : Spacing setting failed.
Sample
Refer to the createGraph function.
setFloorDepth(value) → boolean
Sets the depth of the graph's floor plane in the vertical direction.
value
number
The depth of the graph's floor plane in the vertical direction.
Return
true : Depth setting successful.
false : Depth setting failed.
Sample
Refer to the createGraph function.
Getter / Setter
getDescription(), setDescription(desc) → string
Set a description for the object.
desc
string
Object description string.
Return
string: Successful return of the object's description string.
null: If the object is null.
getName(), setName(name) → string
Sets the name of the object.
name
string
The name to set for the object.
Return
string: Successful return of the object's name.
null: If the object is null.
getVisible(), setVisible(visible) → boolean
Sets the visibility state of an object.
visible
boolean
true: Make the object visible. false: Hide the object.
Return
true: Object visible state.
false: Object hidden state.
Last updated