Skip to main content
Version: 8.1

Perspective - Linear Scale

Component Palette Icon:

Description

The Linear Scale component displays a series of tick marks and labels that represent a range between a minimum value and a maximum value. It also displays indicators that represent a value or range of values, correctly positioned on the linear scale.

Linear Scale component allows floating point tick marks such as 0.25, 0.5, 0.75, 1.25, etc.

Properties

Most Properties have binding options. For more information on Bindings, see Types of Bindings in Perspective. This section only documents the Props Category of properties. The other Categories are described on the Perspective Component Properties page.

NameDescriptionProperty Type
minValueThe minimum value displayed on the scale.value: numeric
maxValueThe maximum value displayed on the scale.value: numeric
majorTicksSettings for the major tick marks on the scale. See the majorTicks properties.object
minorTicksSettings for the minor tick marks on the scale. See the minorTicks properties.object
fineTicksSettings for the fine tick marks on the scale. See the fineTicks properties.object
labelsDisplays of the numeric values of major tick marks. Options are as follows:
  • angle: Rotation of the numeric labels. Default is 0. Value is numeric.
  • style: Sets a style for the label. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class.
  • object
    indicatorsMarkers of special significance that can be placed along the scale. Click here to see the indicators properties.object
    mirrorAligns the scale to the opposite side of the component. Default is false.value: boolean
    reverseInverts the order of the scale values so min to max is ordered in reverse. Default is false (minimum to max).value: boolean
    styleSets a style for this scale. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class.object

    Tick Child Properties

    The following child properties apply to majorTicks, minorTicks, and fineTicks.

    NameDescriptionProperty Type
    spanDistance between each tick mark of this type, in pixels. Default is 20.value: numeric
    lengthLength of each tick mark, in pixels. Default is 20.value: numeric
    colorColor for the major ticks. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector.color
    strokeWidth of each tick mark, in pixels. Default is 1.value: numeric

    indicators Child Properties

    NameDescriptionProperty Type
    valueNumeric value along the scale where the indicator is placed or started.value: numeric
    labelText to display with the indicator. Default is "High".value: string
    labelColorColor of the indicator label. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector.color
    labelAngleRotational angle of the indicator label.value: numeric
    colorColor of the indicator or the area making up the indicator. See Color Selector.color
    strokeIf indicatorStyle is set to line or wedge, stroke is the width (in pixels) of the indicator.value: numeric
    opacityOpacity of the indicator. 0 is fully transparent, 1 is fully opaque.value: numeric
    lengthLength of the indicator as measured by its x value within the scale. Default is 25.value: numeric
    indicatorStyleIndicator style can be set to line, wedge, or range. Line is similar to a tick mark. Wedge displays a triangular shape. Range displays a rectangular range along the scale as measured by the property extent. Default is range.value: string dropdown
    extentIf indicatorStyle is set to range, this is the extent along the scale that the indicator is placed. Default is 15.value: numeric

    Component Events

    The Perspective Event Types Reference page describes all the possible component event types for Perspective components. Not all component events support each Perspective component. The Component Events and Actions page shows how to configure events and actions on a Perspective component. Component scripting is handled separately and can be accessed from the Component menubar or by right clicking on the component.

    Example

    PropertyValue
    props.maxValue120
    props.minorTicks.span10
    props.fineTicks.span5
    props.indicators.0.value95
    props.indicators.0.color#D90000
    props.indicators.0.extent25
    props.indicators.1.value00
    props.indicators.1.indicatorStylerange
    props.indicators.1.color#D9D900
    props.indicators.1.extent20
    props.indicators.2.value74
    props.indicators.2.indicatorStylewedge
    props.indicators.2.color#0000D9