EnablePassedStyles: Boolean;
The EnablePassedStyles property determines whether to use style for tick marks and text labels of speedometer scale, passed with the main arrow of this scale.
Use JSON or the setEnablePassedStyles method to set the property value, and the getEnablePassedStyles method to get the property value.
If the property is set to True, styles are used for the passed scale values, otherwise they are not used.
To execute the example, the page must contain the Speedometer component named speedometer (see Example of Creating a Speedometer with a Wizard).
Get speedometer scale arrow and disable opacity for this arrow. Set arrow length and its value. Refresh scale tick marks and redraw text labels. Get central text label in speedometer, and set left alignment for the label text:
// Get speedometer scale var scale = speedometer.getScales()[3]; // Get scale arrow by its name var arrow = scale.getArrowByName("Arrow1")[0]; // Disable opacity arrow.setOpacityEnabled(False); // Set arrow length arrow.setRadius(0.8); // Set arrow value arrow.setValue(400); // Refresh scale tick marks scale.refreshTicks(); // Redraw text labels scale.redrawLabels(); // Get center text label in the speedometer var label = speedometer.getCenterLabel(); // Set left alignment for the text label.setTextAlign(PP.HorizontalAlignment.Left);
As the result, arrow properties change. After changing arrow value, corresponding styles are applied for passed labels in speedometer scale. Text in the central text label is aligned to the left:
Disable using styles for passed scale values:
// Disable styles for passed values scale.setEnablePassedStyles(False);
As the result, styles are disabled for passed scale values:
See also: