Padding: PP.Thickness;
The Padding property determines component paddings.
Use JSON or the setPadding method to set the property value, and the getPadding method to get the property value.
To execute the example, the page must contain the Speedometer component named speed1 (see Example of Creating a Fuel Gauge Unit).
Set value for speedometer paddings, handle the Refreshed event. Define and set the settings that show speedometer border. Refresh the speedometer view and set border width value:
// Set padding value speed1.setPadding(25); // Handle speedometer refresh event speed1.Refreshed.add(function (sender, eventArgs, timeout) { console.log("The Refreshed event is initiated"); }); // Determine border display settings var metadata = [{ Name: "gaugeMaster.speedometerPanel.borderEnable", Value: True }] // Set settings speed1.setMasterSettings(metadata); // Refresh speedometer view by settings border width value speed1.refreshView(new PP.Ui.PropertyChangedEventArgs({ PropertyName: 'GaugeSettings', Metadata: [{ Name: "gaugeMaster.speedometerPanel.borderPanel.thickness", Value: 5 }] }));
After executing the example speedometer paddings are changed, and the border is shown:
The browser console shows a message that the handled event was invoked:
Refreshed event initialized
See also: