14.1.1 Defining a Widget

The image below shows the definition of the Google Pie Chart widget shipped with Visual LANSA.

This is a Control Widget which will allow the Google Pie Chart produced to be visualized.

A Title property has been defined as a string, allowing the Title of the chart to be set.

There are three methods allowing the chart to have data added, removed or cleared.

Lastly, there is an ItemSelected event so that a click on an item in the chart can be detected.

Each of these features requires some JavaScript to implement them. The name of the routine(s) associated with the feature must match the name of the feature and its defined parameters.

See also

14.1.3 Example Widget