CSBL - widgetSingleContent, widgetSpeedometer and widgetGaugeChart (IN)

×

Warning message

You can't delete this newsletter because it has not been sent to all its subscribers.

 

First of all, an existing widgetSingleContent, widgetSpeedometer or widgetGaugeChart must be identified in the dashboard, of which the id <TARGET_WIDGET_NAME> must be noted.
The JS function to be inserted in the appropriate CK Editor box (in more options) of another widget of the same dashboard, in order to pilot the <TARGET_WIDGET_NAME> is of the following type:

function execute() {
       $('body').trigger({
             type: "showLastDataFromExternalContentGis_<TARGET_WIDGET_NAME>"
             eventGenerator: $(this),
             targetWidget: <TARGET_WIDGET_NAME>,
             color1: "#acb2fa",
             color2: "#231d5c",
             widgetTitle: "Occupied Parking Lots (Alberti Car Park)",
             field: "occupiedParkingLots",
             serviceUri: "http://www.disit.org/km4city/resource/iot/orionUNIFI/DISIT/CarParkPal.Giustizia"
       });
}

In the above example, the parameters color1, color2 and widgetTitle are required in order to set the style of the target widget.
 

6.3.1 (Alternative) widgetSingleContent with structured data

First of all, an existing widgetSingleContent must be identified in the dashboard, of which the id <TARGET_WIDGET_NAME> must be noted.
The JS function to be inserted in the appropriate CK Editor box (in more options) of another widget of the same dashboard, in order to pilot the <TARGET_WIDGET_NAME> widgetSingleContent  is of the following type:

function execute() {
       $('body').trigger({
             type: "showSingleContentFromExternalContent_<TARGET_WIDGET_NAME>"
             eventGenerator: $(this),
             targetWidget: <TARGET_WIDGET_NAME>,
             color1: "#acb2fa",
             color2: "#231d5c",
             widgetTitle: "Occupied Parking Lots (Alberti Car Park)",
             passedData: { 'dataOperation': param}
       });
}

The param variable is made up of the input value generated by the current widget's state change.