Technical Reference

DTO Reference

Complete JSON specification for all KnowMine graph widget API responses. All graph widgets share the same response envelope; the payload field contains chart-specific data.

This reference describes what your API must return. If you prefer a ready-made implementation, check out the knowmine-graphs open source library.

Response Envelope

Every API endpoint must return a JSON object with the following top-level structure.

{ "name": "Widget Title", "type": "WidgetTypeName", "version": "1.0", "payload": { "..." }, "refreshInterval": 30, "backgroundColor": { "type": "Fill | Gradient", "primaryColor": "#RRGGBB", "secondaryColor": "#RRGGBB" }, "backgroundType": "NONE | RECT | ROUND_RECT | ...", "borderColor": "#RRGGBB | primary_color | ...", "shadowColor": "#RRGGBB | primary_color | ..." }
Field Type Req Default Notes
name string null Widget display name. User can override in-app.
type string Widget type identifier. Case-sensitive. See chart types below.
version string null Datasource format version (e.g. "1.0"). Reserved for future use.
payload object Chart-specific data. See each chart type.
refreshInterval number 30 Auto-refresh in seconds. Min: 5, Max: 60.
backgroundColor ColorSpec null Widget container background.
backgroundType string "NONE" Background shape. See Background Types.
borderColor string null Border color. Hex or palette key.
shadowColor string null Shadow color. Hex or palette key.

Shared Types

Color Strings

Any field accepting a color string supports two formats:

  • Hex: "#RRGGBB" (6 digits) or "#RRGGBBAA" (8 digits with alpha)
  • Palette keys that resolve to the user's active page theme:
KeyResolved color
"primary_color"Page primary color
"secondary_color"Page secondary color
"background_color"Page background color
"text_color"Page text color
"accent_color"Page accent color
"custom_color"Page custom color

ColorSpec

{ "type": "Fill", "primaryColor": "#00FFFF", "secondaryColor": "#0000FF" }
FieldTypeReqNotes
type "Fill" | "Gradient" Fill = solid, Gradient = two-color gradient
primaryColor string Hex or palette key. For gradients: start/center color.
secondaryColor string Required when type is "Gradient". End/outer color.

FontModel

{ "font": "Lato-Regular", "color": { "type": "FILL", "color": "#FFFFFF", "secondaryColor": "#000000" } }
FieldTypeReqNotes
font string Font raw value (e.g. "Lato-Regular", "Orbitron-Bold").
color.type "FILL" | "GRADIENT" | "NONE" Color type (uppercase).
color.color string Primary hex color.
color.secondaryColor string Required when color.type is "GRADIENT".

namePosition

Controls the position of the widget title relative to the chart.

ValueDescription
"TOP_LEFT"Top, left-aligned (default)
"TOP"Top, centered
"TOP_RIGHT"Top, right-aligned
"BOTTOM_LEFT"Bottom, left-aligned
"BOTTOM"Bottom, centered
"BOTTOM_RIGHT"Bottom, right-aligned
"LEFT", "CENTER", "RIGHT" are not supported.

YAxisPosition

Controls the Y-axis display mode. Applies to BarChart, AreaChart, TimeSeriesLineChart, and StackedBarChart.

ValueScaleLabelsSide
absent / "NONE"AutoNone
"AUTO"AutoAuto-generated (min, mid, max)Left
"LEFT"Fixed if yMin/yMax presentFrom yAxisLabelsLeft only
"RIGHT"Fixed if yMin/yMax presentFrom yAxisLabelsRight only
"BOTH"Fixed if yMin/yMax presentFrom yAxisLabelsBoth sides
Each side reserves 28pt (no unit) or 44pt (with yAxisUnit) inside horizontal padding.

Background Types

Valid values for backgroundType:

NONE RECT ROUND_RECT ROUND_RECT_TL ROUND_RECT_TR ROUND_RECT_BL ROUND_RECT_BR ROUND_RECT_TL_NEG ROUND_RECT_TR_NEG ROUND_RECT_BL_NEG ROUND_RECT_BR_NEG ROUND_RECT_OPP_1 ROUND_RECT_OPP_2 ROUND_RECT_TOP ROUND_RECT_LEFT ROUND_RECT_BOTTOM ROUND_RECT_RIGHT SMALL_ROUND_RECT

Chart Types

1. BarChart

type: "BarChart" 2×1

Vertical bar chart with gradient support, optional single-bar highlight, and configurable corner radius.

Example Response
{ "name": "Monthly Sales", "type": "BarChart", "version": "1.0", "refreshInterval": 30, "backgroundColor": { "type": "Fill", "primaryColor": "#1A1A2E" }, "backgroundType": "ROUND_RECT", "payload": { "values": [8.0, 14.0, 10.0, 18.0, 12.0, 22.0], "highlightIndex": 5, "barColor": { "type": "Gradient", "primaryColor": "#00FFFF", "secondaryColor": "#0000FF" }, "highlightColor": { "type": "Fill", "primaryColor": "#FF8C00" }, "labels": ["Jan", "Feb", "Mar", "Apr", "May", "Jun"], "labelColor": { "type": "Fill", "primaryColor": "#FFFFFF" }, "yAxisLabels": ["0", "11", "22"], "yAxisUnit": null, "yAxisPosition": "LEFT", "yAxisLabelColor": { "type": "Fill", "primaryColor": "#FFFFFF99" }, "yMin": 0, "yMax": 22, "barSpacing": 4, "cornerRadius": 6, "showGlow": false, "horizontalPadding": 12, "verticalPadding": 10, "nameFont": { "font": "Lato-Regular", "color": { "type": "FILL", "color": "#FFFFFF" } }, "namePosition": "TOP_LEFT" } }
Payload Fields
FieldTypeReqDefaultNotes
valuesnumber[]Bar values. At least one required.
barColorColorSpecColor applied to all standard bars.
highlightIndexnumbernull0-based index of the highlighted bar.
highlightColorColorSpecRequired if highlightIndex is present.
labelsstring[]nullText labels below each bar.
labelColorColorSpecFill #FFFFFFLabel text color.
yAxisLabelsstring[]nullY-axis labels. Used with LEFT/RIGHT/BOTH.
yAxisUnitstringnullUnit suffix on Y-axis labels (e.g. "KB/s").
yAxisPositionstringnullSee YAxisPosition.
yAxisLabelColorColorSpecFill #FFFFFFY-axis label color.
yMinnumbernullScale minimum. Required for fixed scale mode.
yMaxnumbernullScale maximum. Required for fixed scale mode.
barSpacingnumber4Gap between bars in points.
cornerRadiusnumber6Bar corner radius in points.
showGlowbooleanfalseGlow on the highlighted bar.
horizontalPaddingnumber12Horizontal canvas padding.
verticalPaddingnumber10Vertical canvas padding.
nameFontFontModelLato-Regular #FFFWidget title font and color.
namePositionstring"TOP_LEFT"Title position. See namePosition.

2. PieChart

type: "PieChart" 1×1 · 2×1

Full pie or donut chart. Each slice has its own color. In 2×1, a legend is shown on the right (up to 5 entries; >5 slices aggregate as "Others").

Example Response
{ "name": "Expense Breakdown", "type": "PieChart", "version": "1.0", "refreshInterval": 30, "backgroundColor": { "type": "Fill", "primaryColor": "#1A1A2E" }, "backgroundType": "ROUND_RECT", "payload": { "slices": [ { "value": 40.0, "color": { "type": "Gradient", "primaryColor": "#00FFFF", "secondaryColor": "#0000FF" }, "label": "Alpha", "labelColor": { "type": "Fill", "primaryColor": "#00FFFF" } }, { "value": 35.0, "color": { "type": "Gradient", "primaryColor": "#FF8C00", "secondaryColor": "#FF0000" }, "label": "Beta", "labelColor": { "type": "Fill", "primaryColor": "#FF8C00" } }, { "value": 25.0, "color": { "type": "Gradient", "primaryColor": "#800080", "secondaryColor": "#4B0082" }, "label": "Gamma", "labelColor": { "type": "Fill", "primaryColor": "#CC66FF" } } ], "innerRadiusRatio": 0.5, "sliceSpacing": 3, "outerPadding": 10, "showGlow": false, "showPercentage": false, "nameFont": { "font": "Lato-Regular", "color": { "type": "FILL", "color": "#FFFFFF" } }, "namePosition": "TOP_LEFT" } }
Payload Fields
FieldTypeReqDefaultNotes
slicesSliceSpec[]Array of slices drawn clockwise from -90°.
slices[].valuenumberSlice value (auto-normalized to total).
slices[].colorColorSpecSlice color. For gradients: center→outer edge.
slices[].labelstringnullLegend label (2×1 only).
slices[].labelColorColorSpecSemi-whiteLegend label color.
innerRadiusRationumber0.00 = full pie, 0.5 = donut. Range 0–0.9.
sliceSpacingnumber3Gap between slices in points.
outerPaddingnumber10Padding between pie edge and canvas.
showGlowbooleanfalseGlow effect on each slice.
glowColorColorSpecFill #FFFGlow color (if showGlow is true).
showPercentagebooleanfalseShow percentage next to each legend entry.
nameFontFontModelLato-Regular #FFFWidget title font and color.
namePositionstring"TOP_LEFT"Title position. See namePosition.

3. AreaChart

type: "AreaChart" 2×1

Area chart with a top line and vertically-gradient fill. Supports a configurable baseline and optional X-axis labels. Ideal for trends over time.

Example Response
{ "name": "Weekly Temperature", "type": "AreaChart", "version": "1.0", "refreshInterval": 30, "backgroundColor": { "type": "Fill", "primaryColor": "#1A1A2E" }, "backgroundType": "ROUND_RECT", "payload": { "values": [12.0, 15.0, 13.0, 18.0, 16.0, 22.0, 20.0], "baselineValue": 10.0, "lineColor": { "type": "Fill", "primaryColor": "#00FFFF" }, "areaColor": { "type": "Gradient", "primaryColor": "#00FFFF", "secondaryColor": "#00000000" }, "lineWidth": 2.5, "smoothingEnabled": true, "showGlow": false, "horizontalPadding": 12, "verticalPadding": 10, "labels": ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], "labelColor": { "type": "Fill", "primaryColor": "#FFFFFF" }, "yAxisLabels": ["10", "16", "22"], "yAxisPosition": "LEFT", "yAxisLabelColor": { "type": "Fill", "primaryColor": "#FFFFFF99" }, "nameFont": { "font": "Lato-Regular", "color": { "type": "FILL", "color": "#FFFFFF" } }, "namePosition": "TOP_LEFT" } }
Payload Fields
FieldTypeReqDefaultNotes
valuesnumber[]Chronological values. Minimum 2.
lineColorColorSpecTop line color.
areaColorColorSpecArea fill (opaque top → transparent bottom).
baselineValuenumbernullBaseline for the area. Defaults to min value.
glowColorColorSpecGlow color. Required if showGlow is true.
lineWidthnumber2.5Line thickness in points.
smoothingEnabledbooleantrueCatmull-Rom smooth curve vs. straight polyline.
showGlowbooleanfalseGlow effect on the line.
horizontalPaddingnumber12Horizontal canvas padding.
verticalPaddingnumber10Vertical canvas padding.
labelsstring[]nullX-axis labels (1:1 per data point). Ignored if xAxisLabels present.
labelColorColorSpecFill #FFFLabel color.
showGridbooleanfalseBackground grid.
gridRowsnumber4Horizontal grid rows.
gridColumnsnumber6Vertical grid columns.
gridColorColorSpecFill #FFFFFF26Grid line color (if showGrid is true).
xAxisLabelsstring[]nullN labels distributed geometrically. Priority over labels.
xAxisLabelColorColorSpecnullColor for xAxisLabels. Falls back to labelColor.
yAxisLabelsstring[]nullY-axis labels. Used with LEFT/RIGHT/BOTH.
yAxisUnitstringnullUnit suffix on Y-axis labels.
yAxisPositionstringnullSee YAxisPosition.
yAxisLabelColorColorSpecFill #FFFY-axis label color.
yMinnumbernullScale minimum. Required for fixed scale.
yMaxnumbernullScale maximum. Required for fixed scale.
nameFontFontModelLato-Regular #FFFWidget title font and color.
namePositionstring"TOP_LEFT"Title position.

4. TimeSeriesLineChart

type: "TimeSeriesLineChart" 2×1

Time series line with a horizontal gradient and vertical fill. Optional background grid. Suited for real-time or historical data with a technical dashboard look.

Example Response
{ "name": "Energy Consumption", "type": "TimeSeriesLineChart", "version": "1.0", "refreshInterval": 30, "backgroundColor": { "type": "Fill", "primaryColor": "#1A1A2E" }, "backgroundType": "ROUND_RECT", "payload": { "values": [10.0, 13.0, 11.0, 17.0, 15.0, 20.0, 18.0, 24.0], "lineColor": { "type": "Gradient", "primaryColor": "#00FFFF", "secondaryColor": "#0000FF" }, "areaColor": { "type": "Gradient", "primaryColor": "#00FFFF", "secondaryColor": "#00000000" }, "gridColor": { "type": "Fill", "primaryColor": "#FFFFFF26" }, "lineWidth": 2.5, "showGrid": true, "smoothingEnabled": true, "showGlow": false, "gridRows": 4, "gridColumns": 6, "horizontalPadding": 12, "verticalPadding": 10, "labels": ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", "Mon"], "labelColor": { "type": "Fill", "primaryColor": "#FFFFFF" }, "yAxisLabels": ["10", "17", "24"], "yAxisPosition": "LEFT", "yAxisLabelColor": { "type": "Fill", "primaryColor": "#FFFFFF99" }, "yMin": 10, "yMax": 24, "nameFont": { "font": "Lato-Regular", "color": { "type": "FILL", "color": "#FFFFFF" } }, "namePosition": "TOP_LEFT" } }
Payload Fields
FieldTypeReqDefaultNotes
valuesnumber[]Chronological values. Minimum 2.
lineColorColorSpecLine gradient (horizontal, left→right).
areaColorColorSpecFill gradient (vertical, opaque→transparent).
gridColorColorSpecGrid color. Required if showGrid is true.
glowColorColorSpecGlow color. Required if showGlow is true.
lineWidthnumber2.5Line thickness.
showGridbooleantrueBackground grid.
smoothingEnabledbooleantrueSmooth curve.
showGlowbooleanfalseGlow on the line.
gridRowsnumber4Horizontal grid rows.
gridColumnsnumber6Vertical grid columns.
horizontalPaddingnumber12Horizontal canvas padding.
verticalPaddingnumber10Vertical canvas padding.
labelsstring[]nullX-axis labels (1:1). Ignored if xAxisLabels present.
labelColorColorSpecFill #FFFLabel color.
xAxisLabelsstring[]nullN labels distributed geometrically. Priority over labels.
xAxisLabelColorColorSpecnullColor for xAxisLabels.
yAxisLabelsstring[]nullY-axis labels. Used with LEFT/RIGHT/BOTH.
yAxisUnitstringnullUnit suffix on Y-axis labels.
yAxisPositionstringnullSee YAxisPosition.
yAxisLabelColorColorSpecFill #FFFY-axis label color.
yMinnumbernullScale minimum.
yMaxnumbernullScale maximum.
nameFontFontModelLato-Regular #FFFWidget title.
namePositionstring"TOP_LEFT"Title position.

5. StackedBarChart

type: "StackedBarChart" 2×1

Multi-series stacked bars. Corner radius applied to top and bottom of the composed bar only. Good for part-to-whole relationships.

Example Response
{ "name": "Traffic by Category", "type": "StackedBarChart", "version": "1.0", "refreshInterval": 30, "backgroundColor": { "type": "Fill", "primaryColor": "#1A1A2E" }, "backgroundType": "ROUND_RECT", "payload": { "series": [ { "values": [4.0, 6.0, 5.0, 8.0, 7.0, 9.0], "color": { "type": "Gradient", "primaryColor": "#00FFFF", "secondaryColor": "#00CCCC" } }, { "values": [3.0, 4.0, 3.0, 5.0, 4.0, 6.0], "color": { "type": "Gradient", "primaryColor": "#0000FF", "secondaryColor": "#0000CC" } }, { "values": [2.0, 2.0, 3.0, 3.0, 2.0, 4.0], "color": { "type": "Gradient", "primaryColor": "#4B0082", "secondaryColor": "#36006E" } } ], "cornerRadius": 6, "barSpacing": 4, "showGlow": false, "horizontalPadding": 12, "verticalPadding": 10, "labels": ["Jan", "Feb", "Mar", "Apr", "May", "Jun"], "labelColor": { "type": "Fill", "primaryColor": "#FFFFFF" }, "yAxisLabels": ["0", "10", "19"], "yAxisPosition": "LEFT", "yAxisLabelColor": { "type": "Fill", "primaryColor": "#FFFFFF99" }, "yMin": 0, "yMax": 19, "nameFont": { "font": "Lato-Regular", "color": { "type": "FILL", "color": "#FFFFFF" } }, "namePosition": "TOP_LEFT" } }
Payload Fields
FieldTypeReqDefaultNotes
seriesSeriesSpec[]Array of series. First = bottom, last = top. Same count per series.
series[].valuesnumber[]Values for each bar in this series.
series[].colorColorSpecColor for this segment.
cornerRadiusnumber6Applied to top and bottom of composed bar only.
barSpacingnumber4Gap between bars.
showGlowbooleanfalseGlow on top segment.
horizontalPaddingnumber12Horizontal canvas padding.
verticalPaddingnumber10Vertical canvas padding.
labelsstring[]nullLabels below each bar.
labelColorColorSpecFill #FFFLabel color.
yAxisLabelsstring[]nullY-axis labels.
yAxisUnitstringnullUnit suffix on Y-axis labels.
yAxisPositionstringnullSee YAxisPosition.
yAxisLabelColorColorSpecFill #FFFY-axis label color.
yMinnumbernullScale minimum.
yMaxnumbernullScale maximum.
nameFontFontModelLato-Regular #FFFWidget title.
namePositionstring"TOP_LEFT"Title position.

6. RadialGauge

type: "RadialGauge" 1×1

Arc gauge with configurable opening angle (nearly full circle to semicircle). Color thresholds override arc color based on value. Optional graduation ticks.

Example Response
{ "name": "CPU Usage", "type": "RadialGauge", "version": "1.0", "refreshInterval": 30, "backgroundColor": { "type": "Fill", "primaryColor": "#1A1A2E" }, "backgroundType": "ROUND_RECT", "payload": { "value": 72.0, "minValue": 0.0, "maxValue": 100.0, "thresholds": [ { "value": 40.0, "color": { "type": "Fill", "primaryColor": "#00FF00" } }, { "value": 80.0, "color": { "type": "Fill", "primaryColor": "#FF8C00" } }, { "value": 100.0, "color": { "type": "Fill", "primaryColor": "#FF0000" } } ], "gaugeColor": { "type": "Gradient", "primaryColor": "#00FFFF", "secondaryColor": "#0000FF" }, "gaugeBackgroundColor": { "type": "Fill", "primaryColor": "#FFFFFF26" }, "valueTextColor": { "type": "Fill", "primaryColor": "#FFFFFF" }, "gapAngle": 120, "lineWidth": 14, "showTicks": false, "showGlow": false, "label": "CPU", "unit": "%", "nameFont": { "font": "Lato-Regular", "color": { "type": "FILL", "color": "#FFFFFF" } }, "namePosition": "TOP_LEFT" } }
Payload Fields
FieldTypeReqDefaultNotes
valuenumberCurrent value (clamped to min/max).
minValuenumberScale minimum.
maxValuenumberScale maximum.
gaugeColorColorSpecArc color. Ignored when a threshold is active.
thresholdsThresholdSpec[][]Color thresholds. Each overrides gaugeColor in its range.
thresholds[].valuenumberThreshold upper bound.
thresholds[].colorColorSpecArc color for this zone.
gaugeBackgroundColorColorSpecWhite low opacityBackground arc color (full track).
glowColorColorSpecGlow color. Required if showGlow is true.
valueTextColorColorSpecFill #FFFCenter text color.
tickColorColorSpecFill #FFFFFF66Tick color (if showTicks is true).
gapAnglenumber120Bottom gap in degrees. 0 = full circle, 120 = tachometer, 180 = semicircle.
lineWidthnumber14Arc thickness in points.
showTicksbooleanfalseGraduation ticks.
showGlowbooleanfalseGlow on the arc.
labelstringnullText below value (e.g. "CPU").
unitstringnullUnit inline with value (e.g. "%", "°C").
nameFontFontModelLato-Regular #FFFWidget title.
namePositionstring"TOP_LEFT"Title position.
unit is rendered inline with the value (e.g. 72%); label is a separate descriptive line below (e.g. CPU).

7. RadialGaugeLarge

type: "RadialGaugeLarge" 2×1

2 or 3 side-by-side radial gauges on a single 2×1 widget with a shared title. Omit gauge3 for a 2-gauge layout.

Example Response (3 gauges)
{ "name": "System Status", "type": "RadialGaugeLarge", "version": "1.0", "refreshInterval": 30, "backgroundColor": { "type": "Fill", "primaryColor": "#1A1A2E" }, "backgroundType": "ROUND_RECT", "payload": { "gauge1": { "value": 72.0, "minValue": 0.0, "maxValue": 100.0, "thresholds": [ { "value": 40.0, "color": { "type": "Fill", "primaryColor": "#00FF00" } }, { "value": 80.0, "color": { "type": "Fill", "primaryColor": "#FF8C00" } }, { "value": 100.0, "color": { "type": "Fill", "primaryColor": "#FF0000" } } ], "gaugeColor": { "type": "Gradient", "primaryColor": "#00FFFF", "secondaryColor": "#0000FF" }, "gaugeBackgroundColor": { "type": "Fill", "primaryColor": "#FFFFFF26" }, "valueTextColor": { "type": "Fill", "primaryColor": "#FFFFFF" }, "gapAngle": 120, "lineWidth": 14, "label": "CPU" }, "gauge2": { "value": 45.0, "minValue": 0.0, "maxValue": 100.0, "gaugeColor": { "type": "Gradient", "primaryColor": "#00FFFF", "secondaryColor": "#0000FF" }, "gaugeBackgroundColor": { "type": "Fill", "primaryColor": "#FFFFFF26" }, "valueTextColor": { "type": "Fill", "primaryColor": "#FFFFFF" }, "gapAngle": 120, "lineWidth": 14, "label": "RAM" }, "gauge3": { "value": 55.0, "minValue": 0.0, "maxValue": 200.0, "gaugeColor": { "type": "Gradient", "primaryColor": "#FF8C00", "secondaryColor": "#FF0000" }, "gaugeBackgroundColor": { "type": "Fill", "primaryColor": "#FFFFFF26" }, "valueTextColor": { "type": "Fill", "primaryColor": "#FFFFFF" }, "gapAngle": 120, "lineWidth": 14, "label": "Disk" }, "nameFont": { "font": "Lato-Regular", "color": { "type": "FILL", "color": "#FFFFFF" } }, "namePosition": "TOP_LEFT" } }
Payload Fields
FieldTypeReqDefaultNotes
gauge1GaugeSpecLeft gauge. Same schema as RadialGauge payload, without nameFont/namePosition.
gauge2GaugeSpecCenter (3 gauges) or right (2 gauges).
gauge3GaugeSpecnullOptional right gauge. Absent = 2-gauge layout.
nameFontFontModelLato-Regular #FFFShared widget title.
namePositionstring"TOP_LEFT"Title position.
GaugeSpec fields: value ✅, minValue ✅, maxValue ✅, gaugeColor ✅, thresholds ❌, gaugeBackgroundColor ❌, glowColor ❌, valueTextColor ❌, tickColor ❌, gapAngle ❌, lineWidth ❌, showTicks ❌, showGlow ❌, label ❌, unit ❌.

8. CircularProgress

type: "CircularProgress" 1×1

Full 360° progress ring (0.0–1.0). Center text with optional caption. For goals, battery, download progress, or any percentage metric.

Example Response
{ "name": "Goal Completion", "type": "CircularProgress", "version": "1.0", "refreshInterval": 30, "backgroundColor": { "type": "Fill", "primaryColor": "#1A1A2E" }, "backgroundType": "ROUND_RECT", "payload": { "progress": 0.72, "label": "72%", "ringColor": { "type": "Gradient", "primaryColor": "#00FFFF", "secondaryColor": "#0000FF" }, "ringBackgroundColor": { "type": "Fill", "primaryColor": "#FFFFFF26" }, "valueColor": { "type": "Fill", "primaryColor": "#FFFFFF" }, "caption": "Goal", "captionPosition": "below", "captionColor": { "type": "Fill", "primaryColor": "#FFFFFF99" }, "lineWidth": 14, "showValue": true, "showGlow": false, "nameFont": { "font": "Lato-Regular", "color": { "type": "FILL", "color": "#FFFFFF" } }, "namePosition": "TOP_LEFT" } }
Payload Fields
FieldTypeReqDefaultNotes
progressnumberProgress value 0.0–1.0.
ringColorColorSpecProgress arc color.
labelstringnullCenter text. If absent, auto-percentage shown.
ringBackgroundColorColorSpecWhite low opacityBackground ring (full 360°).
valueColorColorSpecFill #FFFCenter text color (if showValue is true).
captionstringnullSecondary text adjacent to value.
captionPosition"above" | "below""below"Caption position relative to value.
captionColorColorSpecWhite low opacityCaption color.
lineWidthnumber14Ring thickness in points.
showValuebooleantrueShow center text.
showGlowbooleanfalseGlow on the arc.
nameFontFontModelLato-Regular #FFFWidget title.
namePositionstring"TOP_LEFT"Title position.

9. KPIMetric

type: "KPIMetric" 1×1

KPI value with unit, trend indicator (up/down/neutral + percentage), and embedded sparkline. Designed for at-a-glance monitoring of a single key metric.

Example Response
{ "name": "Steps Today", "type": "KPIMetric", "version": "1.0", "refreshInterval": 30, "backgroundColor": { "type": "Fill", "primaryColor": "#1A1A2E" }, "backgroundType": "ROUND_RECT", "payload": { "value": 8432.0, "unit": "steps", "trendPercentage": 12.3, "trendDirection": "up", "sparklineValues": [3200, 4100, 3800, 5600, 6200, 7400, 8432], "valueColor": { "type": "Fill", "primaryColor": "#FFFFFF" }, "trendUpColor": { "type": "Fill", "primaryColor": "#00FF00" }, "trendDownColor": { "type": "Fill", "primaryColor": "#FF0000" }, "sparklineColor": { "type": "Gradient", "primaryColor": "#00FFFF", "secondaryColor": "#00000000" }, "isInt": true, "showSparkline": true, "showGlow": false, "nameFont": { "font": "Lato-Regular", "color": { "type": "FILL", "color": "#FFFFFF" } }, "namePosition": "TOP_LEFT" } }
Payload Fields
FieldTypeReqDefaultNotes
valuenumberPrimary KPI value.
valueColorColorSpecPrimary value text color.
unitstringnullUnit of measure (e.g. "km", "bpm", "°C").
trendPercentagenumbernullAbsolute percentage change.
trendDirection"up" | "down" | "neutral""neutral"Trend direction. Required if trendPercentage is present.
sparklineValuesnumber[][]Historical values for sparkline (min 2). Required if showSparkline is true.
trendUpColorColorSpecColor for upward trend. Required if direction can be "up".
trendDownColorColorSpecColor for downward trend. Required if direction can be "down".
sparklineColorColorSpecSparkline color. Required if showSparkline is true.
isIntbooleanfalseDisplay value as integer (no decimals).
showSparklinebooleanfalseShow embedded sparkline.
showGlowbooleanfalseGlow on sparkline.
nameFontFontModelLato-Regular #FFFWidget title.
namePositionstring"TOP_LEFT"Title position.

Widget Type Summary

type iOS DTO Size Description
BarChartBarChart2x1DTO2×1Vertical bar chart with highlight
PieChartPieChartDTO1×1, 2×1Pie or donut with optional legend
AreaChartAreaChart2x1DTO2×1Area chart with gradient fill
TimeSeriesLineChartTimeSeriesLineChart2x1DTO2×1Time series line with optional grid
StackedBarChartStackedBarChart2x1DTO2×1Multi-series stacked bar
RadialGaugeRadialGauge1x1DTO1×1Arc gauge with thresholds
RadialGaugeLargeRadialGaugeLarge2x1DTO2×12 or 3 side-by-side gauges
CircularProgressCircularProgress1x1DTO1×1360° progress ring
KPIMetricKPIMetric1x1DTO1×1KPI with trend and sparkline