GaugeCenterLabel.Arrow

Syntax

Arrow: PP.Ui.GaugeArrowBase;

Description

The Arrow property determines a scale arrow for central text label.

Comments

Use JSON and the setArrow method to set the property value, and the getArrow method to get the property value.

Example

To execute the example, the page must contain the Speedometer component with the speedometer identifier (see Example of Creating a Speedometer with a Wizard). Set a scale arrow, values output format in label and ability of automatic calculation of parameters for central text label:

// Delete setup wizard
master.setDataView(null);
master.dispose();
// Get central speedometer label
var label = speedometer.getCenterLabel();
// Get speedometer scale
var scale = speedometer.getScales()[3];
// Get scale arrow by name
var arrow = scale.getArrowByName("Arrow1")[0];
// Prohibit transparency use
arrow.setOpacityEnabled(False);
// Set arrow length
arrow.setRadius(0.8);
// Set arrow value
arrow.setValue(200.123);
// Set scale arrow for central label
label.setArrow(arrow);
// Set values output format in label text
label.setMaskLabel("{0:0.000}");
// Set whether central label size is automatically calculated with calling object redrawing
label.setAutoSize(True, True);

After executing the example a line arrow is set for central text label, as well as the 200.123 value displayed in the specified format. Text label size is recalculated according to the size of new label value:

See also:

GaugeCenterLabel