Skip to content

EN User JSON SpeedometerIndicator

roosit edited this page May 12, 2026 · 2 revisions

Speedometer JSON

Back to list | Indicator page

Purpose

This page helps you manually configure a JSON template for the speedometer. The indicator name in the template is speedometer.

Full Template

The template below contains all speedometer settings with the initial values defined in the indicator code.

{
  "name": "speedometer",
  "data": {
    "maket": {
      "preset": "auto"
    },
    "properties": {
      "Distance": {
        "sourceId": {},
        "sensorId": {}
      },
      "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": {
        "value": 2.5
      }
    }
  }
}

Settings

Field names are case-sensitive: speedScale and speedscale are different names.

Distance

Selects the speed source. If sourceId and sensorId are left empty, Velitask can choose a suitable sensor when the template is added.

{
  "Distance": {
    "sourceId": {},
    "sensorId": {}
  }
}
Field Values What it does
sourceId {} or { "localId": number } Data source in the current project.
sensorId {} or { "localId": number } Speed sensor inside the source.

localId depends on the current project. If you need a strictly selected sensor, export a template from Velitask and copy the Distance block from it.

speedScale

Selects the maximum value 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
3 320 km/h

Initial value: 2, scale 160 km/h.

font

Configures the font and color of the number in the center of the speedometer.

{
  "font": {
    "name": "Dialog",
    "style": 0,
    "size": 48,
    "color": {
      "r": 255,
      "g": 255,
      "b": 255,
      "a": 255
    }
  }
}
Field Values What it does
name font name Selects the font family. If the font is unavailable, the system may replace it.
style 0, 1, 2 0 regular, 1 bold, 2 italic.
size number 1+ Text size.
color color object Color of the center number.

textTemplate

Configures the text in the center of the speedometer.

{
  "textTemplate": {
    "template": "{curr}",
    "vars": {
      "curr": "%.0f"
    }
  }
}
Field Values What it does
template string Center text. Current speed is inserted as {curr}.
vars.curr number format Formats the {curr} value.
Format Result
%.0f Integer: 82.
%.1f One decimal place: 82.4.
%.2f Two decimal places: 82.35.

Example with a label:

{
  "textTemplate": {
    "template": "{curr} km/h",
    "vars": {
      "curr": "%.0f"
    }
  }
}

bgColor

Sets the color of the circular background under the scale.

{
  "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 is fully transparent, 255 is opaque.

scaleColor

Sets the color of 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 is fully transparent, 255 is opaque.

arrowFillColor

Sets the main needle color.

{
  "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 is fully transparent, 255 is opaque.

arrowStrokeColor

Sets the color of the needle outline and center point.

{
  "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 is fully transparent, 255 is opaque.

arrowStrokeWidth

Sets the needle outline width.

{
  "arrowStrokeWidth": {
    "value": 2.5
  }
}
Field Values What it does
value number 0+ Outline width.

Initial value: 2.5.

Clone this wiki locally