Skip to content

User JSON SlopeTextIndicator

roosit edited this page May 15, 2026 · 3 revisions

Slope Text JSON

Back to list | Indicator page | Russian

Purpose

This page describes the JSON template for the slopeText indicator for manual .vttp editing.

Full Template

{
  "name": "com.velitask.plagin.official.slopeText",
  "data": {
    "maket": { "preset": "auto" },
    "properties": {
      "Slope": {},
      "font": {"name":"Dialog","style":{"value":0},"size":{"value":48},"color":{"r":255,"g":255,"b":255,"a":255}},
      "textAlign": {"value":0},
      "measurement": {"system":{"value":0},"unit":{"value":0},"format":{"value":0}},
      "textTemplate": {"template":"{type} {pc}% ({curr}{currUnit} / {length}{lengthUnit})","vars":{"type":"%s","typec":"%s","pc":"%.1f","curr":"%.1f","currUnit":"%s","length":"%.1f","lengthUnit":"%s","height":"%.1f","heightUnit":"%s","ele":"%.1f","eleUnit":"%s","eleCurr":"%.1f","up":"%.1f","down":"%.1f"}}
    }
  }
}

Settings

Slope

Selects the slope sensor.

{
  "Slope": {}
}
Field Values What it does
sourceId source id in the project In a real Mixel, selects the data source. It may be omitted in a template.
sensorId sensor id in the source In a real Mixel, selects the concrete sensor. It may be omitted in a template.

font

Changes text font and color.

{
  "font": {"name":"Dialog","style":{"value":0},"size":{"value":48},"color":{"r":255,"g":255,"b":255,"a":255}}
}
Field Values What it does
value or nested fields depends on the setting type Stores the setting value.

textAlign

Aligns text inside the layer.

{
  "textAlign": {"value":0}
}
Field Values What it does
value or nested fields depends on the setting type Stores the setting value.

measurement

Selects distance and elevation units.

{
  "measurement": {"system":{"value":0},"unit":{"value":0},"format":{"value":0}}
}
Field Values What it does
value or nested fields depends on the setting type Stores the setting value.

textTemplate

Defines the text and slope variables.

{
  "textTemplate": {"template":"{type} {pc}% ({curr}{currUnit} / {length}{lengthUnit})","vars":{"type":"%s","typec":"%s","pc":"%.1f","curr":"%.1f","currUnit":"%s","length":"%.1f","lengthUnit":"%s","height":"%.1f","heightUnit":"%s","ele":"%.1f","eleUnit":"%s","eleCurr":"%.1f","up":"%.1f","down":"%.1f"}}
}
Field Values What it does
template string with variables in curly braces Final text.
vars object with variable formats Formats variable values.

Clone this wiki locally