You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implementation files are hosted on the client's site.
Walk Through
1. Import dependencies
<!-- include third party dependencies --><scriptsrc="https://code.vertex-analytics.com/_third/monaco-editor-0.18.1/package/min/vs/loader.js"></script><linkrel="stylesheet" type="text/css" href="https://code.vertex-analytics.com/_third/tooltipster-master/dist/css/tooltipster.bundle.min.css"/><scripttype="text/javascript" src="https://code.vertex-analytics.com/_third/tooltipster-master/dist/js/tooltipster.bundle.min.js"></script><!-- include third party fonts -->
@import url(https://fonts.googleapis.com/css?family=Roboto:400);
@import url(https://fonts.googleapis.com/css?family=Roboto:500);
@import url(https://fonts.googleapis.com/css?family=Roboto+Mono);
3. Import the framework in the body tag
<!-- include vx.chart api files in order --><scriptsrc="https://code.vertex-analytics.com/vx-chart-1.0.0/vx-enum.js"></script><scriptsrc="https://code.vertex-analytics.com/vx-chart-1.0.0/vx-util.js"></script><scriptsrc="https://code.vertex-analytics.com/vx-chart-1.0.0/vx-main.js"></script><scriptsrc="https://code.vertex-analytics.com/vx-chart-1.0.0/vx-draw.js"></script><scriptsrc="https://code.vertex-analytics.com/vx-chart-1.0.0/vx-cube.js"></script><scriptsrc="https://code.vertex-analytics.com/vx-chart-1.0.0/vx-core.js"></script>
5. Implement an initialization function.
Call vX.onReady with an initialization function. This function is called when the framework has finished loading.
// called after the api is ReadyfunctiononReady(){}// Assign the onReady callback vX.onReady(onReady);
6. Derive a class from vX.cube.
classBookChartextendsvX.cube{constructor(pConfiguration){super(pConfiguration);}//Called by the framework if an exception occurred during creation of the chart.//pError = critical error description object.onError(pError){console.log("onError Called");console.log(pError);}//Called by the framework before data is read with a calls to onRead.//pInfo = initialization object.onOpen(pInfo){//console.log ("onOpen Called");//console.log (pInfo);}//Called by the framework to read each record of data.//pItem = event item number, 0 to rows-1.onRead(pItem){lettEvnt={};// Add FID recordthis.CubeEvnt(tEvnt);}//Called by the framework after all records have been read.//pInfo = status of the book build and any errors encountered object.onShut(pInfo){console.log("onShut Called");console.log(pInfo);}}
7. Create the vX.cube derived class with configuration parameters.
gCube=newBookChart({//email : "registered_email",//password : "registered_password",rows : 1234,title : "Title of the chart",tickSize : 0.25,displayType : 1,displayTypeEx : 1});
Configuration Parameters
Parameter
Description
email
Registered email
password
Registered password
rows
Number of event records in the chart
tickSize
Smallest price resolution
title
Title of the chart
displayType
Primary price format of the chart
displayTypeEx
Secondary price format of the chart
Authentication
The framework can be used with the supplied demo data without registration.
For user defined data, a user must be registered with Vertex-Analytics.
Contact Vertex-Analytics for a version configured for client distribution.
Price Format
The framework's price format uses the CME FIX display format.
For decimal prices, use displayType=0. The resolution of the digits will be automatically be calculated based on the ticksize.