Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ Core widget types for AI/BI dashboards. For advanced visualizations (area, scatt
"name": "title",
"multilineTextboxSpec": {"lines": ["## Dashboard Title"]}
},
"position": {"x": 0, "y": 0, "width": 6, "height": 1}
"position": {"x": 0, "y": 0, "width": 12, "height": 1}
},
{
"widget": {
"name": "subtitle",
"multilineTextboxSpec": {"lines": ["Description text here"]}
},
"position": {"x": 0, "y": 1, "width": 6, "height": 1}
"position": {"x": 0, "y": 1, "width": 12, "height": 1}
}

// WRONG: Multiple lines concatenate into one line!
Expand All @@ -62,7 +62,7 @@ Core widget types for AI/BI dashboards. For advanced visualizations (area, scatt
"lines": ["## Dashboard Title", "Description text here"] // Becomes "## Dashboard TitleDescription text here"
}
},
"position": {"x": 0, "y": 0, "width": 6, "height": 2}
"position": {"x": 0, "y": 0, "width": 12, "height": 2}
}
```

Expand Down Expand Up @@ -117,7 +117,7 @@ Format types: `number`, `number-currency`, `number-percent`
"frame": {"showTitle": true, "title": "Total Revenue"}
}
},
"position": {"x": 0, "y": 0, "width": 2, "height": 3}
"position": {"x": 0, "y": 0, "width": 4, "height": 3}
}
```

Expand Down Expand Up @@ -147,7 +147,7 @@ Format types: `number`, `number-currency`, `number-percent`
"frame": {"showTitle": true, "title": "Total Spend"}
}
},
"position": {"x": 0, "y": 0, "width": 2, "height": 3}
"position": {"x": 0, "y": 0, "width": 4, "height": 3}
}
```

Expand Down Expand Up @@ -188,7 +188,7 @@ Format types: `number`, `number-currency`, `number-percent`
"frame": {"showTitle": true, "title": "Details"}
}
},
"position": {"x": 0, "y": 0, "width": 6, "height": 6}
"position": {"x": 0, "y": 0, "width": 12, "height": 6}
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Combines bar and line visualizations on the same chart - useful for showing rela
"frame": {"title": "Revenue & Growth Rate", "showTitle": true}
}
},
"position": {"x": 0, "y": 0, "width": 6, "height": 5}
"position": {"x": 0, "y": 0, "width": 12, "height": 5}
}
```

Expand Down
23 changes: 13 additions & 10 deletions databricks-skills/databricks-aibi-dashboards/3-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ dashboard = {
"name": "overview",
"displayName": "NYC Taxi Overview",
"pageType": "PAGE_TYPE_CANVAS",
"layoutVersion": "GRID_V1",
"layout": [
# Text header - NO spec block! Use SEPARATE widgets for title and subtitle!
{
Expand All @@ -57,7 +58,7 @@ dashboard = {
"lines": ["## NYC Taxi Dashboard"]
}
},
"position": {"x": 0, "y": 0, "width": 6, "height": 1}
"position": {"x": 0, "y": 0, "width": 12, "height": 1}
},
{
"widget": {
Expand All @@ -66,9 +67,9 @@ dashboard = {
"lines": ["Trip statistics and analysis"]
}
},
"position": {"x": 0, "y": 1, "width": 6, "height": 1}
"position": {"x": 0, "y": 1, "width": 12, "height": 1}
},
# Counter - version 2, width 2!
# Counter - version 2, width 4!
{
"widget": {
"name": "total-trips",
Expand All @@ -89,7 +90,7 @@ dashboard = {
"frame": {"title": "Total Trips", "showTitle": True}
}
},
"position": {"x": 0, "y": 2, "width": 2, "height": 3}
"position": {"x": 0, "y": 2, "width": 4, "height": 3}
},
{
"widget": {
Expand All @@ -111,7 +112,7 @@ dashboard = {
"frame": {"title": "Average Fare", "showTitle": True}
}
},
"position": {"x": 2, "y": 2, "width": 2, "height": 3}
"position": {"x": 4, "y": 2, "width": 4, "height": 3}
},
{
"widget": {
Expand All @@ -133,7 +134,7 @@ dashboard = {
"frame": {"title": "Average Distance", "showTitle": True}
}
},
"position": {"x": 4, "y": 2, "width": 2, "height": 3}
"position": {"x": 8, "y": 2, "width": 4, "height": 3}
},
# Bar chart - version 3
{
Expand All @@ -160,7 +161,7 @@ dashboard = {
"frame": {"title": "Trips by Pickup ZIP", "showTitle": True}
}
},
"position": {"x": 0, "y": 5, "width": 6, "height": 5}
"position": {"x": 0, "y": 5, "width": 12, "height": 5}
},
# Table - version 2, minimal column props!
{
Expand Down Expand Up @@ -189,7 +190,7 @@ dashboard = {
"frame": {"title": "Top ZIP Codes", "showTitle": True}
}
},
"position": {"x": 0, "y": 10, "width": 6, "height": 5}
"position": {"x": 0, "y": 10, "width": 12, "height": 5}
}
]
}]
Expand Down Expand Up @@ -229,6 +230,7 @@ dashboard_with_filters = {
"name": "overview",
"displayName": "Sales Overview",
"pageType": "PAGE_TYPE_CANVAS",
"layoutVersion": "GRID_V1",
"layout": [
{
"widget": {
Expand All @@ -250,14 +252,15 @@ dashboard_with_filters = {
"frame": {"title": "Total Revenue", "showTitle": True}
}
},
"position": {"x": 0, "y": 0, "width": 6, "height": 3}
"position": {"x": 0, "y": 0, "width": 12, "height": 3}
}
]
},
{
"name": "filters",
"displayName": "Filters",
"pageType": "PAGE_TYPE_GLOBAL_FILTERS", # Required for global filter page!
"layoutVersion": "GRID_V1",
"layout": [
{
"widget": {
Expand Down Expand Up @@ -286,7 +289,7 @@ dashboard_with_filters = {
"frame": {"showTitle": True, "title": "Region"} # Always show title!
}
},
"position": {"x": 0, "y": 0, "width": 2, "height": 2}
"position": {"x": 0, "y": 0, "width": 4, "height": 2}
}
]
}
Expand Down
14 changes: 8 additions & 6 deletions databricks-skills/databricks-aibi-dashboards/3-filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"frame": {"showTitle": true, "title": "Region"}
}
},
"position": {"x": 0, "y": 0, "width": 2, "height": 2}
"position": {"x": 0, "y": 0, "width": 4, "height": 2}
}
```

Expand All @@ -75,6 +75,7 @@ Place on a dedicated filter page:
"name": "filters",
"displayName": "Filters",
"pageType": "PAGE_TYPE_GLOBAL_FILTERS",
"layoutVersion": "GRID_V1",
"layout": [
{
"widget": {
Expand All @@ -100,7 +101,7 @@ Place on a dedicated filter page:
"frame": {"showTitle": true, "title": "Campaign"}
}
},
"position": {"x": 0, "y": 0, "width": 2, "height": 2}
"position": {"x": 0, "y": 0, "width": 4, "height": 2}
}
]
}
Expand All @@ -117,6 +118,7 @@ Place filter widget directly on a `PAGE_TYPE_CANVAS` page (same widget structure
"name": "platform_breakdown",
"displayName": "Platform Breakdown",
"pageType": "PAGE_TYPE_CANVAS",
"layoutVersion": "GRID_V1",
"layout": [
{"widget": {...}, "position": {...}},
{
Expand All @@ -130,7 +132,7 @@ Place filter widget directly on a `PAGE_TYPE_CANVAS` page (same widget structure
"frame": {"showTitle": true, "title": "Platform"}
}
},
"position": {"x": 4, "y": 0, "width": 2, "height": 2}
"position": {"x": 8, "y": 0, "width": 4, "height": 2}
}
]
}
Expand Down Expand Up @@ -181,7 +183,7 @@ Place filter widget directly on a `PAGE_TYPE_CANVAS` page (same widget structure
"frame": {"showTitle": true, "title": "Date Range"}
}
},
"position": {"x": 0, "y": 0, "width": 2, "height": 2}
"position": {"x": 0, "y": 0, "width": 4, "height": 2}
}
```

Expand Down Expand Up @@ -225,7 +227,7 @@ When a filter should affect multiple datasets (e.g., "Region" filter for both sa
"frame": {"showTitle": true, "title": "Region"}
}
},
"position": {"x": 0, "y": 0, "width": 2, "height": 2}
"position": {"x": 0, "y": 0, "width": 4, "height": 2}
}
```

Expand All @@ -237,4 +239,4 @@ Each `queryName` in `encodings.fields` binds the filter to that specific dataset

- Global filters: Position on dedicated filter page, stack vertically at `x=0`
- Page-level filters: Position in header area of page (e.g., top-right corner)
- Typical sizing: `width: 2, height: 2`
- Typical sizing: `width: 4, height: 2`
Loading