Portal Community

Minimal Example

{
  "id": "usage-trend",
  "type": "chart-line",
  "label": "Usage Over Time",
  "width": "full",
  "settings": {
    "height": "300px",
    "binding": {
      "source": "$context",
      "path": "metrics.dailyUsage"
    }
  }
}

// Data shape (single series):
// [{ "label": "2025-01-01", "value": 1240 }, ...]

Settings Reference

SettingTypeDefaultDescription
smoothbooleanfalseRender smooth curved lines instead of straight segments
showPointsbooleantrueShow data point markers on the line
pointSizenumber4Radius of data point markers in pixels
lineWidthnumber2Line stroke width in pixels
seriesSeriesDef[]Multi-series: [{ key, label }]
referenceLinesReferenceLine[]Horizontal threshold lines: [{ value, label, color }]
chartConfig.xAxisobjectX axis settings: label, type (category/time), dateFormat
chartConfig.yAxisobjectY axis settings: label, format, min, max

Multi-Series with Reference Line

{
  "id": "actuals-vs-forecast",
  "type": "chart-line",
  "settings": {
    "height": "350px",
    "title": "Actuals vs Forecast",
    "smooth": true,
    "showPoints": true,
    "labelKey": "month",
    "series": [
      { "key": "actual",   "label": "Actual" },
      { "key": "forecast", "label": "Forecast" }
    ],
    "referenceLines": [
      { "value": 100000, "label": "Target", "color": "#22c55e" }
    ],
    "chartConfig": {
      "yAxis": { "label": "Revenue", "format": "currency" }
    },
    "binding": { "source": "$context", "path": "report.trend" }
  }
}

Time Series with Date X-Axis

{
  "id": "stock-price",
  "type": "chart-line",
  "settings": {
    "smooth": true,
    "showPoints": false,
    "chartConfig": {
      "xAxis": {
        "type": "time",
        "dateFormat": "MMM DD"
      },
      "yAxis": {
        "label": "Price (USD)",
        "format": "currency"
      }
    },
    "binding": { "source": "$context", "path": "stock.priceHistory" }
  }
}
// Data: [{ "label": "2025-01-15T00:00:00Z", "value": 145.23 }, ...]