This preconfiguration can be activated when creating a new Pmg object
and is included in the group: "/ Widgets"
. Creates the PmgFrame
object configured as - Widget Chart - Bar graph.
The preconfiguration creates a PmgFrame
object in the selected panel, a new panel subobject PmaWebDir
and copies the files Charts.js
and the license text file Chart_Licence.txt
into the Resource
folder of the application..
The link in the PmgFrame
object refers to the html page widget.htm
in the PmaWebDir
object. This request invokes the widget
method in the PmaWebDir.onPageModify
event. This creates an html page with a link to the chart.js
widget library and configures the parameters for the chart to be displayed. At the same time, it requests (at the specified period) the data for displaying, which is provided by the data
It is necessary to modify the script in the data
method so it provides the required application data to be displayed.
Properties, type and parameters for the displayed graph are modified in the widget
method and their syntax is available on the widget web pages:
This widget (chart.js
) was licensed as MIT
at the time this preconfiguration was created. It means that it is unrestricted and freely distributable.
For the widget to work properly in a local application, it is necessary to have WewbView2 (Edge) installed on the Windows OS.
The component is called Microsoft Edge WebView2 Runtime version Evergreen.
Its use must be enabled in the application's "ini" file.
See Web browser (/#glob/webbrowser)
These configurators can be set before the preconfiguration is created:
|Object name||Name (identifier) of the Pmg object. It is used to obtain the Pmg object by the PmgObject.Items method.
This configurator sets the initial value of the Name property.
The maximum name length is 30 characters. This is a system name, so it must contain only alphanumeric and must not contain any diacritics, empty string, spaces and the first character must not be a number.
|Creates a PmgFrame object, a PmaWebDir subobject and inserts the widget files "chart.js" and "Chart_Licence.txt" into the Resource folder.|
|Name of the PmaWebDir subobject||Name of the PmaWebDir subobject|
|Name of the widget object||Name of the widget object|