Dashbrew components visualize data using different source types and type definitions.
Common Component Types and Data Sources
Text Component (API Data)
Displays real-time data from a URL.
{
"type": "component",
"component": {
"type": "text",
"title": "🌦️ Weather",
"data": {
"source": "api",
"url": "https://wttr.in/<YOUR_CITY>?format=4",
"refresh_interval": 60
}
}
}
Todo List (File Data)
Displays a list from a local text file.
{
"type": "component",
"component": {
"type": "todo",
"title": "📋 My Todo List",
"data": {
"source": "./todo.txt"
}
}
}
Chart (Script Data)
Visualizes numeric data from a script command.
{
"type": "component",
"component": {
"type": "chart",
"title": "📊 System Metrics",
"data": {
"source": "script",
"command": "echo '10\n25\n15\n30\n45'",
"refresh_interval": 5,
"caption": "CPU Usage (%)"
}
}
}
Histogram (Script Data)
Shows distributions using key: count lines or a JSON object.
{
"type": "component",
"component": {
"type": "histogram",
"title": "📊 Age Distribution",
"data": {
"source": "script",
"command": "echo '"18-24": 45\n"25-34": 78\n"35-44": 52\n"45-54": 34\n"55+": 21'",
"caption": "Users by Age Group"
}
}
}