Skip to content

User JSON SpeedometerIndicator

roosit edited this page Oct 16, 2026 · 4 revisions

Speedometer JSON

Back to list | Indicator page | Русский

Purpose

This page describes the JSON template of the speedometer indicator for manual editing of .vttp: which fields exist and which values are allowed.

Full Template

{
  "name": "com.velitask.plagin.official.speedometer",
  "data": {
    "maket": { "preset": "auto" },
    "properties": {
      "Distance": {},
      "speedScale": { "value": 2 },
      "font": {
        "name": "Dialog",
        "style": 0,
        "size": 120,
        "color": { "r": 255, "g": 255, "b": 255, "a": 255 }
      },
      "textTemplate": {
        "template": "{curr}",
        "vars": { "curr": "%.0f" }
      },
      "scaleColor": { "r": 255, "g": 255, "b": 255, "a": 255 },
      "arrowFillColor": { "r": 204, "g": 88, "b": 84, "a": 255 },
      "arrowStrokeColor": { "r": 255, "g": 255, "b": 255, "a": 255 },
      "tailColor": { "r": 103, "g": 136, "b": 166, "a": 178 },
      "background": {
        "color": { "r": 204, "g": 204, "b": 204, "a": 255 },
        "transparency": {}
      }
    }
  }
}

An empty object {} in transparency means the default value 80; to set your own, use {"value": 80}.

Settings

Distance

Selects the distance sensor that the speed is taken from. In a template leave it empty: the sensor is picked automatically when the indicator is added to a project.

{
  "Distance": {}
}
Field Values What it does
sourceId {"value": number} Identifier of the source in the project. Not specified in a template.
sensorId {"value": number} Identifier of the sensor in the source. Not specified in a template.

speedScale

The maximum of the speedometer scale.

{
  "speedScale": {
    "value": 2
  }
}
Field Values What it does
value 0, 1, 2, 3 Index of the selected scale.
value Scale
0 40 km/h
1 80 km/h
2 160 km/h (default)
3 320 km/h

font

The font and color of the number in the center.

{
  "font": {
    "name": "Dialog",
    "style": 0,
    "size": 120,
    "color": { "r": 255, "g": 255, "b": 255, "a": 255 }
  }
}
Field Values What it does
name string Font name.
style 0, 1, 2 Style: 0 plain, 1 bold, 2 italic.
size 1..999 Font size.
color.r 0..255 Red channel.
color.g 0..255 Green channel.
color.b 0..255 Blue channel.
color.a 0..255 Opacity: 0 fully transparent, 255 opaque.

textTemplate

The template of the number in the center. It builds a string from the current speed in km/h.

{
  "textTemplate": {
    "template": "{curr}",
    "vars": {
      "curr": "%.0f"
    }
  }
}
Field Values What it does
template string The resulting text with variables in curly braces.
vars object Formats of the variables.

Template variables

Variable Default format What it shows
{curr} %.0f The current speed in km/h.

scaleColor

The color of the tick marks and the scale numbers.

{
  "scaleColor": { "r": 255, "g": 255, "b": 255, "a": 255 }
}
Field Values What it does
r 0..255 Red channel.
g 0..255 Green channel.
b 0..255 Blue channel.
a 0..255 Opacity: 0 fully transparent, 255 opaque.

arrowFillColor

The fill of the needle.

{
  "arrowFillColor": { "r": 204, "g": 88, "b": 84, "a": 255 }
}
Field Values What it does
r 0..255 Red channel.
g 0..255 Green channel.
b 0..255 Blue channel.
a 0..255 Opacity: 0 fully transparent, 255 opaque.

arrowStrokeColor

The color of the needle outline and the central dot.

{
  "arrowStrokeColor": { "r": 255, "g": 255, "b": 255, "a": 255 }
}
Field Values What it does
r 0..255 Red channel.
g 0..255 Green channel.
b 0..255 Blue channel.
a 0..255 Opacity: 0 fully transparent, 255 opaque.

tailColor

The color of the "tail", the sector that is painted behind the needle.

{
  "tailColor": { "r": 103, "g": 136, "b": 166, "a": 178 }
}
Field Values What it does
r 0..255 Red channel.
g 0..255 Green channel.
b 0..255 Blue channel.
a 0..255 Opacity: 0 fully transparent, 255 opaque.

background

The color of the circle under the scale and its transparency.

{
  "background": {
    "color": { "r": 204, "g": 204, "b": 204, "a": 255 },
    "transparency": { "value": 80 }
  }
}
Field Values What it does
color.r 0..255 Red channel.
color.g 0..255 Green channel.
color.b 0..255 Blue channel.
color.a 0..255 Opacity of the color itself: 0 fully transparent, 255 opaque.
transparency.value 0..100 Background transparency in percent: 0 opaque, 100 fully transparent. The default is 80. An empty object {} means the default value 80; to set your own, use {"value": 80}.

Clone this wiki locally