Substitution Variables

In some cases you will have a JavaScript charting library with more than one configuration of include files, such as .js and .css. Instead of having to create a JavaScript Charting Engine for each situation, you can use Substitution Variables

1. JavaScript Charting Engine

The following JavaScript Charting Engine has additional .js and .css files to include, depending on which JavaScript Chart type is applied. These additional scripts will be placed in a Substitution Variable named "${ADDITIONAL_SCRIPTS}".

2. Configure Substitution Variable

In the HTML for this JavaScript Charting Engine, provide a Substitution Variable named "${ADDITIONAL_SCRIPTS}" to create a placeholder for pulling in additional scripts to the HTML template.

<link rel="stylesheet" type="text/css" href="${HOST_NAME}css/libs/dynamicpivot/pivot.css?ver=${PROJECT_VERSION}">
<script type="text/javascript" src="${HOST_NAME}js/jquery/jquery-1.8.3.min.js?ver=${PROJECT_VERSION}"></script>
<script type="text/javascript" src="${HOST_NAME}js/jquery/jquery-ui-1.9.2.custom.min.js?ver=${PROJECT_VERSION}"></script>
<script type="text/javascript" src="${HOST_NAME}js/libs/dynamicpivot/pivot.js?ver=${PROJECT_VERSION}"></script>
<script type="text/javascript" src="${HOST_NAME}js/api/mi.js?ver=${PROJECT_VERSION}"></script>

3. Apply Substitution Variable

Then for each JavaScript Charting Template, apply the Substitution Variable. Click the Add New Substitution button to add, or edit gear to edit the Substitution Variable.

4. Apply Substitution Variable