Skip to content

EN User JSON SpeedometerIndicator

roosit edited this page Oct 16, 2026 · 2 revisions

Speedometer JSON

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

Purpose

This page describes the JSON template of the "Speedometer" indicator for manual editing: which fields exist, which values are allowed and what you get if you leave the default value.

Full template

{
  "name": "com.velitask.plugin.example.speedometer",
  "data": {
    "maket": { "preset": "auto" },
    "properties": {
      "Distance": {},
      "speedScale": { "value": 2 },
      "font": {
        "name": "Dialog",
        "style": 0,
        "size": 48,
        "color": { "r": 255, "g": 255, "b": 255, "a": 255 }
      },
      "textTemplate": {
        "template": "{curr}",
        "vars": { "curr": "%.0f" }
      },
      "bgColor": { "r": 204, "g": 204, "b": 204, "a": 51 },
      "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 },
      "arrowStrokeWidth": {}
    }
  }
}

An empty object {} means the default value: for Distance no sensor is selected (it will be picked automatically), for arrowStrokeWidth the width is 2.5.

Settings

Distance

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

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

speedScale

The maximum of the speedometer scale. A full needle turn corresponds to the selected maximum.

{
  "speedScale": {
    "value": 2
  }
}
Field Values What it does
value 0, 1, 2, 3 The 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

Font and color of the number in the center.

{
  "font": {
    "name": "Dialog",
    "style": 0,
    "size": 48,
    "color": { "r": 255, "g": 255, "b": 255, "a": 255 }
  }
}
Field Values What it does
name string The font name. Dialog by default.
style 0, 1, 2 Style: 0 plain, 1 bold, 2 italic.
size 1..999 The font size. 48 by default.
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. {curr} by default.
vars object The formats of the variables.

Template variables

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

The format %.0f shows an integer, %.1f shows one digit after the decimal point. You can add text to the template: for example, "{curr} km/h".

bgColor

The color of the round background under the scale. Transparency is set by the a channel; by default the background is semi-transparent.

{
  "bgColor": { "r": 204, "g": 204, "b": 204, "a": 51 }
}
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. 51 by default.

scaleColor

The color of the scale ticks and 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 needle fill. The same color, but semi-transparent, paints the arc behind 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 stroke and the center 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.

arrowStrokeWidth

The needle stroke width. An empty object {} means the default value 2.5.

{
  "arrowStrokeWidth": {}
}

To set your own value:

{
  "arrowStrokeWidth": { "value": 4.0 }
}
Field Values What it does
value number The stroke width. The larger the number, the thicker the stroke. If the field is absent, 2.5 is used.

Clone this wiki locally