Available translations

Panel Data Javascript Code

foundations.png
panel-data-javascript-code.png
This node holds valid JavaScript code to output specific text colors, sizes and opacities for the plotter panel of an indicator.
Content
This node is generally used to change the color of the panel text to match the indicator plotter.
Configuring
Panel Data Configuration
Properties
The table below shows all the configuration items that must be present to output a valid configuration to display on the panel:
Item Description
labelText Defines the label text of the data
textColor Defines the color of the data's label text
valueColor Defines the color of the data's value
textSize Defines the text size of the data's label
valueFontSize Defines the text size of the data's value
textOpacity Defines the opacity of the data's label text
valueOpacity Defines the opacity of the data's value
Example:
The example below uses the trend value from the record data from an EMA indicator to determine how the data is displayed on the panel. This example is taken from the Keltner Baseline Indicator in the Trends data mine:
 if (record.trend == 1) {
    textColor = UI_COLOR.DARK
    valueColor = UI_COLOR.TURQUOISE
    textSize = 16
    valueFontSize = 16
    textOpacity = "1"
    valueOpacity = "1"
} else if (record.trend == -1) {
    textColor = UI_COLOR.DARK
    valueColor = UI_COLOR.PINK
    textSize = 16
    valueFontSize = 16
    textOpacity = "1"
    valueOpacity = "1"
} else {
    textColor = UI_COLOR.DARK
    valueColor = UI_COLOR.GREY
    textSize = 16
    valueFontSize = 16
    textOpacity = "1"
    valueOpacity = "1"
}
Panel Data Javascript Code Menu
The Panel Data Javascript Code node has the following Node Menu items:
The Edit menu item has the following properties:
  • action: Edit
  • actionFunction: uiObject.codeEditor.activate
  • label: Edit
  • iconPathOn: panel-data-javascript-code
  • iconPathOff: panel-data-javascript-code
The Delete menu item has the following properties:
  • action: Delete UI Object
  • actionProject: Visual-Scripting
  • askConfirmation: true
  • confirmationLabel: Confirm to Delete
  • actionFunction: payload.executeAction
  • label: Delete
  • iconPathOn: delete-entity
  • iconPathOff: delete-entity
Panel Data Javascript Code Attaching Rules
The following are the Node Attaching Rules that govern the attachment of Panel Data Javascript Code with other nodes:
Compatible Types:
Panel Data Javascript Code Code
This section explores Panel Data Javascript Code Node Code.
Initial Value
The initial value for Panel Data Javascript Code Code is:
 "// Type your code"
Examples
This is a list of examples used on the Panel Data Javascript Code code, collected from this workspace.