About JavaScript API

Reference:

Visual Discovery provides a JavaScript API that allows developers to add customized functionality to their applications so that analysts can manipulate the graphical components effectively at run time. JavaScript code is reserved for functions, event handling, and page interaction once the HTML page is loaded at run time.

The examples in this appendix assume you know basic JavaScript concepts and syntax. The JavaScript Tags referenced below, summarize the constructs you use with Visual Discovery controls.

Detailed information on the Visual Discovery JavaScript API properties and methods is available in the Visual Discovery Online Help. In addition, several instances of using JavaScript code to enhance a Visual Discovery application are used in Tutorial: Building a Visual Discovery Analytic Dashboard with Advanced Chart Controls. The tutorial will familiarize you with the JavaScript API, to enhance your Visual Discovery applications.


Top of page

x
Reference: JavaScript Tags

As you go through this appendix, refer to the following table, which summarizes basic constructs.

Construct

Description

//

Comment line. Used at the end of a line of code or on a line by itself.

/*...*/

Multiline comment. Used for a comment that spans several lines of code.

{...}

Opening and closing braces that contain the code for a function.

;

Semicolon required at the end of each JavaScript statement.

Note: JavaScript coding is case-sensitive, therefore, it is important to copy the example codes in this appendix as they appear.


WebFOCUS