Purpose
You want to make use of an existing JavaScript framework.

Today there exist powerful JavaScript frameworks - many of them Open Source - for various tasks.

Solution
Add the following JavaScript function in your JavaScript file:

JavaScript

To include the framework, for example the Open Source chart framework "chart.js", call up "loadJS" with the framework URL:

JavaScript

Example
We display the following chart, embedded into the SAP GUI window:

Here we have used fixed values and labels; in practice the values could come from an SAP transaction or from the SAP database.

The sample chart is taken from the following collection of chart.js samples:
http://tobiasahlin.com/blog/chartjs-charts-to-get-you-started

GuiXT script

GuiXT
// the "chart.js" framework requires IE11 emulation mode of the browser control
ProcessingOption ie_browser_emulation="11001"

Box (2,6) (18,85) _
  "World population"

Control (2.7,6.3) (18,85.4) _
  progID="about:blank" _
  name="mychart"

CallJS display_chart "&V[mychart]"

JavaScript

JavaScript

 

Components
InputAssistant + Controls