Introducing a new way to review your PRs.

Read the announcement

bruin-data / dac

DaC is a dashboard-as-code tool. Build interactive dashboards using YAML and JSX. Built-in semantic layer. Get your agents to build standardized, reviewable dashboards.

View on GitHub

20 documents · Updated Nov 23, 2026

docs / dashboard-definition-lifecycle

Dashboard definition lifecycle

The dashboard definition lifecycle turns a project file into one trusted dashboard model. It discovers the project context, loads YAML or executable TSX, resolves shared semantic models, checks the definition, and preserves the fields that later query and render stages need.

This page is part of the dashboard domain model and pipeline. Read dashboard queries and semantic modeling for data work, dashboard rendering and export for delivery paths, and dashboard theming and templating for presentation context.

Definition lifecycle

Lifecycle stages

The lifecycle has one shared path for both authoring forms. YAML supplies a data shape directly, while TSX computes a component tree that is normalized into the same dashboard model before validation.

This diagram shows how a dashboard definition moves from a project file to a model ready for query and view stages.

flowchart LR
    A[Dashboard path] --> B[Project paths]
    B --> C[Semantic model context]
    C --> D{Source form}
    D -->|YAML| E[Schema check and parse]
    D -->|TSX| F[Transpile and evaluate]
    F --> G[Dashboard tree conversion]
    E --> H[Common dashboard model]
    G --> H
    H --> I[Post-process encodings and formats]
    I --> J[Domain validation]
    J --> K[Query and render stages]

References: pkg/…/project.go• L15-74 pkg/…/loader.go• L14-56 pkg/…/loader.go• L103-136 pkg/…/jsloader.go• L24-58 pkg/…/jsloader.go• L383-461 pkg/…/validator.go• L39-225

Common dashboard model

The common dashboard model is the contract between definition loading and all later dashboard work. It holds the dashboard identity, connection and model references, filters, named queries, notes, ordered rows, and widget definitions.

A widget can use a semantic model or metric definition. Otherwise, its executable source resolves from a named query, inline SQL, or static inline data. Inline data lets a data widget render without a connection while keeping its field names compatible with query-backed widgets.

Rows preserve page order and group widgets. Widgets describe either data work or page content. Metric, chart, table, pivot-table, and image widgets can use semantic fields, a named query, inline SQL, or inline data; text and divider widgets are content-only. A tabs widget groups complete child widgets and does not provide shared data or encoding fields.

Widgets can also map result fields to dashboard filters. An absent mapping uses automatic field matching where supported; an explicit mapping names the result field and the filter that it updates.

Inline data uses the same named-column and positional-row shape as query results. This lets data widgets render without a connection while keeping their encodings compatible with query-backed widgets.

Plain tables can group displayed columns under named headers. The group controls belong to the first column in each group block, while pivot tables do not use table column groups.

References: pkg/…/model.go• L15-84 pkg/…/model.go• L170-263 pkg/…/model.go• L328-478 pkg/…/validator.go• L332-381 pkg/…/validator.go• L521-563

Project discovery

Project path resolution

Project discovery gives a dashboard access to the sibling resources that shape its meaning. A supplied project directory acts as the dashboard root when it has no dashboards child; otherwise the child becomes the dashboard directory.

The resolver then looks for semantic and themes directories beside that dashboard directory. This allows a caller to point at either a project root or its dashboards directory without changing how shared resources are found.

References: pkg/…/project.go• L15-53

Dashboard file discovery

Directory loading reads supported dashboard files from the resolved dashboard directory. It ignores subdirectories and hidden entries, then loads YAML files and files whose names end in .dashboard.tsx.

The full directory path is used for listing and validation. Name-based loading first scans metadata without query execution, then loads only the matching file with its normal runtime options. This keeps single-dashboard requests from executing unrelated definitions.

References: pkg/…/loader.go• L14-91 pkg/…/loader.go• L149-152 pkg/…/jsloader.go• L1145-1148

Semantic model context

When a project has a semantic directory, its model catalog is loaded with the dashboard. The catalog supplies shared model names for dimensions, metrics, segments, and relationships; the dashboard can select a default model or map a local alias to a model name.

Invalid models remain marked as invalid instead of blocking unrelated dashboards. A dashboard that refers to the bad model reports the model error during validation or query planning.

References: pkg/…/project.go• L10-12 pkg/…/project.go• L60-74 pkg/…/model.go• L601-625 pkg/…/semantic_query.go• L20-73

Authoring formats

YAML loading

YAML is the direct declarative form of a dashboard. The loader checks the document against the versioned dashboard schema, parses it into the common model, records its source path and type, attaches project context, and applies shared post-processing.

The schema defines the allowed top-level shape and the basic contracts for filters, queries, rows, widgets, and encodings. A missing schema value is filled with the dashboard schema identifier after the document passes the shape check.

References: pkg/…/loader.go• L94-136 schemas/…/schema.json• L1-53 schemas/…/schema.json• L55-227

TSX loading

TSX is the programmatic authoring form. The loader transpiles the source, evaluates it in a small JavaScript runtime, and expects a default export that produces a root <Dashboard> element.

JSX tags become dashboard concepts. Top-level filters, rows, and named queries become dashboard fields. Widgets placed directly under the dashboard or a tab are wrapped into rows so the resulting model always has an ordered row structure. A <WidgetTabs> element becomes a tabs widget whose children are separate, complete tab views.

TSX can run queries while it loads. With no query backend, query() returns empty results so the definition can still be loaded and validated; with a backend, those results can shape filters, rows, and widgets before the model is built. TSX shorthand such as a string axis, value field, or bound field is converted to the same explicit encoding model used by YAML.

The loader preserves an explicit false for boolean chart settings such as horizontal instead of treating it as an absent value. This matters when a chart has a default direction that an author needs to override.

TSX filter mappings use crossFilter on widgets. A filter must not carry this widget-only property; the loader rejects that misplaced form instead of silently dropping it.

References: pkg/…/jsloader.go• L24-58 pkg/…/jsloader.go• L99-234 pkg/…/jsloader.go• L383-461 pkg/…/jsloader.go• L522-548 pkg/…/jsloader.go• L712-722 pkg/…/jsloader_test.go• L14-43 pkg/…/jsloader_test.go• L873-901

JavaScript module support

TSX definitions can split shared dashboard logic into local modules. The built-in require() resolves relative files, caches each loaded module, and gives each module its own directory scope.

JSON modules are read as data. TSX, TS, and JSX modules are transpiled before evaluation. Plain JavaScript runs as written. The module boundary supports CommonJS exports and passes the JSX element helper into modules that create dashboard components.

References: pkg/…/jsrequire.go• L12-99 pkg/…/jsrequire.go• L102-133 pkg/…/jsloader.go• L147-149 pkg/…/jsloader.go• L242-296 pkg/…/jsloader_test.go• L663-801

Definition normalization

Normalization makes YAML and TSX definitions behave alike before validation. It records the source type, attaches the resolved project context, fills chart axis fields when semantic dimensions and metrics are present, and applies compatible display formats from the selected semantic model.

A direct semantic widget uses its dimension as the x field and its metric references as y fields when those encodings are absent. A named semantic query with one dimension supplies that dimension as x, while its metrics supply y. Explicit encodings always take precedence. The default dimension name uses the semantic model context when the dashboard or widget names a model.

Semantic model formats can fill missing axis, value, and table-column formats. An explicit format remains authoritative, including a format on a y field that also supplies a chart value. A format-only value added during this step is not treated as an authored value by validation.

References: pkg/…/loader.go• L117-136 pkg/…/loader.go• L154-200 pkg/…/format.go• L157-257 pkg/…/loader_test.go• L15-49 pkg/…/loader_test.go• L216-398 pkg/…/loader_test.go• L516-567

Definition validity

Schema validity

Schema validation checks the external shape of YAML before the loader creates the model. It rejects unknown fields except extension fields with the x- prefix and enforces basic required fields and value forms.

TSX does not pass through this YAML document check. Its runtime conversion and the shared domain validator provide the comparable safety gate for the model it produces.

References: pkg/…/loader.go• L117-125 schemas/…/schema.json• L1-53 schemas/…/schema.json• L186-227 pkg/…/jsloader.go• L218-232

Domain validity

Domain validation checks whether the loaded model can describe a usable dashboard. It collects all errors so an engineer can fix several issues in one pass.

The checks cover these contracts:

  • The dashboard has a name and at least one row. Each row has at least one widget.
  • Supplied widget IDs are unique. Notes have unique IDs, a present dimensions field, and valid, unique dimension names; an empty dimensions list is valid.
  • Note dimensions use date, date-range, number, boolean, select, or text types. An omitted type means select. Select dimensions resolve against the dashboard semantic model, while non-select dimensions do not need one.
  • Widget note references resolve to a dashboard note or to a note in the semantic context selected by the widget. A semantic named query selects its own model when it names one; otherwise note lookup uses the dashboard model. Referenced semantic note dimensions must also resolve against that model.
  • Each widget has a known type and the source or content that its type needs.
  • Widget column spans are either omitted or within the supported 12-column range. A row can wrap widgets when the total of its spans is larger than 12.
  • Filters use a supported type, valid date defaults, and an optional column span from 1 through 12. A filter tab must match a row tab.
  • Widget filter mappings use known filter names, unique result fields, and a supported chart or table type. Date-range mappings use only the x field of a date-capable chart.
  • Semantic model references and semantic query requests can resolve.
  • Chart encodings match the selected chart and do not combine unsupported features.
  • Table and pivot-table formatting uses valid style rules. Table like references must point to another configured column, while some styles are limited to plain tables or pivot values.
  • Plain table column groups use non-blank names. Grouped columns may be hidden or collapsed as a block only from the first column in that group block; the related freeze control also applies only there.
  • Inline data is limited to metric, chart, table, pivot-table, and image widgets. It does not mix with another source. Its columns must be named and unique. Its rows must match the column count.
  • Image widgets have a source column and an allowed fit mode.
  • Table sparkline columns have one x field and one numeric y field. Their point encodings cannot use table color rules.
  • Vega-Lite charts have a usable view and take data from the widget source rather than a remote URL or embedded values.
  • Tabs have named, non-nested child widgets. Each child is a complete widget and does not inherit fields from the container. The container cannot carry data, encodings, notes, or other child-only fields.
  • Display formats use supported format types and valid currency codes. An inherited format does not satisfy a required value or field that the author omitted.

The validator also rejects chart options that have no supported meaning for the selected chart. Examples include a second axis on a non-cartesian chart, a stacked chart without a category split, a reference band with equal endpoints, an xmr control-limit map, and a pivot field used on both axes.

References: pkg/…/validator.go• L39-225 pkg/…/validator.go• L227-381 pkg/…/validator.go• L384-563 pkg/…/validator.go• L617-645 pkg/…/validator.go• L746-997 pkg/…/validator.go• L1042-1306 pkg/…/validator_test.go• L72-153 pkg/…/validator_test.go• L391-505 pkg/…/validator_test.go• L1357-1449 pkg/…/validator_test.go• L1477-1665

Validation gate

The local server validates every discovered dashboard before it starts serving. Static builds and Slides exports use the same all-dashboard gate before they create output. This separates definition errors from run-time query errors.

A valid definition can still produce a widget error when its connection or query fails later. Validation only proves that the definition and its declared contracts are coherent.

References: pkg/…/server.go• L124-141 pkg/…/validator.go• L508-518 pkg/…/render.go• L36-57 pkg/…/export.go• L46-59

Filter lifecycle

Filter definition

Dashboard filters define named user inputs that can affect widget queries. The supported types are select, date-range, date, number, and text; select filters can allow more than one value.

Options can provide fixed values, a query-backed value list, a connection for that option query, or date-range presets. A select option can also use a semantic dimension and can display a model metric or a query result field with a display format. The filter name is the shared key used by the dashboard view and by query templates. A filter can be global or scoped to a row tab, and its optional col value sets a display span from 1 through 12 columns.

For a select filter, a model-backed option can also define a display format for its metric. The format must use the same supported display-format rules as dashboard values. This keeps metric values in filter option lists readable without changing the values used for selection.

References: pkg/…/model.go• L51-84 schemas/…/schema.json• L55-117 pkg/…/validator.go• L141-171 pkg/…/validator.go• L227-262 pkg/…/validator_test.go• L1514-1621

Widget filter links connect a clicked result field to a declared dashboard filter. Tables, pivot tables, and supported interactive charts can use them; the mapping controls which result field updates which filter. A date-range filter is limited to the x field of line, area, calendar, candlestick, sparkline, or xmr charts because those views provide a time selection.

The link is local to each widget. One widget can map several fields, but the same field cannot map to two filters. A tabs container does not own these links; each child tab must define its own complete behavior.

References: pkg/…/model.go• L61-65 pkg/…/validator.go• L332-381 pkg/…/jsloader.go• L522-538 pkg/…/jsloader_test.go• L14-43 pkg/…/validator_test.go• L72-153

Default filter values

Default filters provide a complete starting context for a dashboard run. Date defaults accept a literal date or an expression such as TODAY-30; date-range presets become a start and end date pair before query work uses them.

At run time, request values replace the defaults. The server first normalizes date values, date-range presets, and scalar select or text values that echo YAML defaults. It then rejects unknown filter names and values with the wrong shape before the merged map flows to SQL templates and semantic query expressions.

References: pkg/…/model.go• L497-587 pkg/…/filter_values.go• L12-65 pkg/…/filter_values.go• L67-111 pkg/…/filter_values.go• L113-209 pkg/…/filter_values_test.go• L42-109 pkg/…/api.go• L169-176 pkg/…/semantic.go• L84-176

Layout model

Row structure

Rows are the ordered layout units of a dashboard. A row may have a height and an optional tab name; widgets without a tab are always visible, while tabbed rows are grouped under the first tab order found in the definition.

The browser presents each row as a twelve-column grid. A widget with no explicit column span receives an even share of the row based on the number of widgets in that row. Explicit spans outside the supported range fail validation, while spans that exceed the remaining row space wrap to the next line.

References: pkg/…/model.go• L164-168 pkg/…/validator.go• L126-129 frontend/…/DashboardView.tsx• L162-175 frontend/…/DashboardView.tsx• L271-277 frontend/…/DashboardView.tsx• L324-337 frontend/…/Row.tsx• L4-25

Widget types

Widget type selects the role a definition plays on the page. Data widgets consume a tabular result or static inline data, while content widgets render without query work. A tabs widget is a container whose child widgets are validated and rendered as separate views.

TypeDefinition roleMain required content
metricShows one valueA value field or semantic metric
chartShows a visual relation between result fieldsA chart type and its required encodings
tableShows rows and selected columnsA query or inline data
pivot_tableReshapes result fields into row and column groupsA query or inline data and a pivot definition
textShows authored textcontent
dividerAdds visual separationNo data or content field
imageShows images from result rowsA query or inline data and an image URL column
tabsGroups complete widget viewsA non-empty list of named child widgets

References: pkg/…/model.go• L15-25 pkg/…/model.go• L170-263 pkg/…/validator.go• L384-446 pkg/…/validator.go• L449-506 frontend/…/dashboard.ts• L54-64 frontend/…/WidgetFrame.tsx• L24-107 frontend/…/DashboardView.tsx• L36-73

Value and widget encodings

Result column contract

Widget encodings name columns in a tabular result. Results keep column names separate from positional row values, so the same field names can drive metrics, charts, tables, images, pivots, and exports.

Inline data follows the same contract as query results. Its columns list names each position, and every row must provide one value for each declared column. A widget can use inline data instead of a query, SQL, or semantic source.

References: pkg/…/model.go• L182-193 pkg/…/model.go• L471-478 pkg/…/api.go• L306-345 frontend/…/dashboard.ts• L292-297 pkg/…/validator.go• L521-563

Axis encodings

Axis encodings connect chart axes to result columns. x.field names one category or time field; y.field can name one or more value series; y2.field moves selected series to a right-side value axis on supported composed charts. YAML and JSON use an object with a required field key, while TSX also accepts a string or list and normalizes it to that object form.

An axis can also state its data type, title, tick format, zero baseline, marker behavior, curve, and dash pattern. The field must use the object form with a required field key in YAML and JSON. This makes a single field and a list of series explicit.

References: pkg/…/model.go• L207-240 pkg/…/model.go• L729-910 pkg/…/jsloader.go• L797-855 schemas/…/schema.json• L608-644 frontend/…/dashboard.ts• L238-255 frontend/…/ChartWidget.tsx• L1217-1287

Value and category encodings

The value encoding names the result column used as a metric or as the numeric value in pie, funnel, heatmap, calendar, treemap, gauge, and Sankey views. It can also define a type and display format.

The label field names a category for pie, funnel, and treemap views. color.field names a category that splits one y series into multiple series. source and target name the two endpoints of a Sankey link; open, high, low, and close name the four price fields of a candlestick view.

The value encoding follows the object form with a required field key in YAML and JSON. TSX accepts a field-name string and turns it into the same model.

References: pkg/…/model.go• L207-240 pkg/…/model.go• L927-1015 pkg/…/jsloader.go• L917-939 pkg/…/validator.go• L746-997 schemas/…/schema.json• L272-393 frontend/…/dashboard.ts• L91-117

Table value encoding

Table columns control which result fields appear and how users read them. A column can rename its header, format numeric values, align content, hide the display while keeping the field available, freeze it during scrolling, render an image, or borrow conditional coloring from another column.

A plain table can group visible columns under named headers. A group can hide or collapse its whole block when the control is set on the first column in that block. Later columns in the block cannot repeat the hide, collapse, or freeze controls. Pivot tables use their pivot definition instead of plain-table column groups.

A sparkline column is a compact trend view inside a table cell. Its cell value is a structured series of point pairs or records, and its x and y encodings name the point fields. The browser accepts a bounded JSON array when a data source returns the series as text; invalid points produce no plotted point rather than changing the table result.

Conditional format layers are checked in order. A matching condition styles the cell; a layer without a condition acts as a base fill or gradient. Gradient ranges use absolute values, percentages, or percentiles, and the range anchors must match the color count.

Pivot values use the same conditional format layers after the table result is grouped. Pivot fields define row and column groups, while each pivot value names an aggregate and an optional display label. Pivot-only scaleBy values normalize a gradient over the full result, a row, or a column.

References: pkg/…/model.go• L328-478 pkg/…/jsloader.go• L1051-1123 pkg/…/validator.go• L1042-1306 pkg/…/validator_test.go• L890-1100 frontend/…/dashboard.ts• L149-236 frontend/…/TableWidget.tsx• L76-198 frontend/…/TableWidget.tsx• L727-780 frontend/…/sparkline.ts• L1-49 frontend/…/SparklineCell.tsx• L28-145

Image and Vega-Lite data encodings

Image widgets map result columns to an image URL, title, caption, and alternate text. The browser renders only bounded absolute HTTPS URLs from another origin, so query data cannot make the dashboard request a same-origin path or an active URL scheme.

Vega-Lite charts use the widget result as the named dac dataset. The definition can describe the view and its marks, but it cannot replace the widget data with embedded values or a remote URL. This keeps chart data under the same query and inline-data rules as other widgets.

References: pkg/…/model.go• L250-263 pkg/…/validator.go• L617-645 pkg/…/validator_test.go• L592-649 frontend/…/dashboardImage.ts• L1-26 frontend/…/WidgetFrame.tsx• L33-105 frontend/…/VegaLiteChart.tsx• L36-151 frontend/…/VegaLiteChart.tsx• L154-279

Chart behavior encodings

Chart behavior fields refine how named result columns become a view. Stacking requires a bar chart and a color category; normalized stacking turns each category group into percentages. A heatmap can print values and use a grid-wide color scale.

Confidence bounds use yMin and yMax. A single column applies to one series; a map can bind each series to its own bound column except for xmr charts, which use one control-limit column per bound. Reference lines and bands mark x or y ranges on supported cartesian charts. A second axis is limited to line, area, bar, and combo charts; its fields must be numeric, disjoint from the left axis, and cannot combine with stacking, category color splits, or horizontal bars.

Series styles can override a line's color, curve, or dash pattern by y-column. Slice styles can override the label or color of a pie, funnel, or treemap slice. The validator checks these style values and rejects malformed color values or unsupported curve and dash names.

References: pkg/…/model.go• L207-240 pkg/…/jsloader.go• L661-683 pkg/…/validator.go• L681-743 pkg/…/validator.go• L746-997 pkg/…/validator_test.go• L770-887 frontend/…/dashboard.ts• L94-117 frontend/…/ChartWidget.tsx• L33-75 frontend/…/ChartWidget.tsx• L1217-1355

Display formats

Value and axis formats control how numbers and dates appear without changing the underlying result. Date formats use time-format rules when the encoding type is date; other formats use number-format rules. When no format is set, the view uses a compact numeric display. Value encodings use the same object form as axis encodings in YAML and JSON, while TSX accepts a field-name string as shorthand.

Semantic model formats provide defaults during normalization. They fill missing axis, value, and table-column formats, while explicit field formats remain unchanged. A partial field map receives defaults only for fields that it does not name. A format-only value created from a model or from an explicit y format carries display information but does not replace the authored value requirement for a chart.

Table columns use number: currency, number: number, or a number-format rule for numeric cells. A legacy scalar table format value remains a display-format shorthand; a list under format means ordered style layers. This keeps older value-format definitions usable while allowing display format and conditional coloring to coexist.

References: pkg/…/format.go• L23-149 pkg/…/format.go• L157-319 pkg/…/loader_test.go• L280-398 pkg/…/loader_test.go• L470-567 frontend/…/format.ts• L23-77 frontend/…/TableWidget.tsx• L854-875 pkg/…/model.go• L328-478 pkg/…/jsloader.go• L1051-1123 frontend/…/dashboard.ts• L149-172

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep project path resolution aligned for calls that pass a project root, a dashboards directory, or a single dashboard file.
  • Keep YAML schema fields, TSX vnode conversion, frontend types, and domain validation aligned when a definition field changes.
  • Keep the .dashboard.tsx naming rule aligned with directory discovery and single-file loading.
  • Keep TSX load-time query result shapes aligned with the data used by loops that generate filters, rows, or widgets.
  • Keep semantic post-processing aligned with chart field lookup so generated x and y fields do not hide the model query result.
  • Keep semantic format inheritance aligned with explicit axis, value, and table-column formats. A display-only inherited value must remain distinct from a required authored value.
  • Keep widget type rules aligned across model constants, TSX tags, validator source checks, and the widget views. This includes data-driven image, sparkline, pivot-table, and tabs behavior.
  • Keep widget filter mappings aligned across YAML, TSX conversion, chart and table support, filter names, and date-range x-axis rules.
  • Keep widget column spans, row tabs, widget tabs, and default column allocation aligned between the model and the grid layout.
  • Keep filter definitions, filter option metric formats, filter column spans, schema bounds, TSX conversion, and frontend filter layout aligned.
  • Keep filter normalization aligned with filter definitions, default values, request JSON shapes, and query template values.
  • Keep encoding names aligned with result-column names, including table like references, sparkline point fields, pivot fields, and per-series bounds.
  • Keep scalar-versus-object encoding rules aligned across YAML, TSX, JSON API data, and frontend format helpers.
  • Keep inline data source rules aligned between model loading, widget source resolution, and validation.
  • Keep image URL rules aligned across image widgets, image table cells, markdown captions, and Vega-Lite image marks.
  • Keep dashboard and semantic-model note IDs and note dimensions aligned with widget note references, including the model selected by a semantic named query and the dashboard model required by select dimensions.
  • Keep tabs container fields separate from complete child widget fields. Keep tab note resolution tied to each tab's model.
  • Keep Vega-Lite's reserved dac data source aligned between spec validation and the data passed to the renderer.
  • Keep table column group blocks, hidden-column rules, and first-column collapse or freeze controls aligned between the model, validator, schema, and table view.

Important failure modes

TriggerConsequenceGuard
A project path has no usable dashboard directoryDiscovery cannot load dashboard definitionsResolve paths through the project root or a recognized dashboards directory.
A YAML file has an unknown field or invalid shapeThe file fails before it becomes a dashboard modelUse the versioned schema and reserve extensions for x- fields.
A TSX file has no default dashboard export or its root is not <Dashboard>TSX loading stops before validationExport one root dashboard vnode from the file.
A TSX load-time query fails or returns an unexpected shapeData-driven filters or widgets cannot be builtUse a backend for data-driven loads and keep query results column-and-row shaped.
A module path cannot be resolved or a module cannot compileThe parent TSX definition fails during evaluationKeep local module paths and supported extensions valid.
A widget source or chart encoding is incompleteDomain validation rejects the dashboard or the view lacks a needed fieldMatch each widget type with its required source and encoding fields.
A widget filter mapping names an unknown filter, repeats a field, or targets a date range from a non-date chartValidation rejects the mapping or the click cannot produce the requested filter valueMap unique result fields to declared filters. Use only the x field of supported date charts for date ranges.
A tabs container has its own data, notes, or chart fields, has unnamed or duplicate children, or nests another tabs widgetValidation rejects the container or the child contract becomes unclearKeep the container for grouping only. Put a complete definition and notes on each named child.
A widget references an empty, duplicate, or unknown note IDValidation rejects the dashboard or the annotation cannot be matchedGive each note a unique ID and reference only dashboard or selected semantic-model notes.
A note has no dimensions field, duplicate dimension names, an unsupported type, or a select dimension without a valid dashboard modelValidation rejects the dashboard or note matching cannot resolve the dimensionKeep dimensions present, use supported types, and resolve select dimensions against the dashboard semantic model. An empty dimensions list is valid.
Inline data is attached to a content widget, mixed with a query source, or has duplicate or empty columnsValidation rejects the widget or its values cannot be addressed by nameUse inline data only for metric, chart, table, pivot-table, or image widgets and keep its columns unique and non-empty.
Inline data rows do not match their column countStatic widgets cannot map values to result fieldsKeep every row positional and equal in length to data.columns.
A pivot has no value, repeats a field, or places one field on both axesThe pivot definition cannot produce a valid grouped tableGive each axis field a unique role and define at least one supported aggregate.
An image widget has no source column or uses an unsupported fit valueThe widget cannot map a result row to an imageSet src to the image URL column and use contain or cover.
Query data contains a relative, same-origin, non-HTTPS, credential-bearing, or oversized image URLThe browser refuses to render the imageUse bounded absolute HTTPS URLs on another origin.
A table sparkline has missing encodings or malformed point dataValidation rejects the definition or the cell shows no trendUse one x field, one numeric y field, and an array of valid point pairs or records.
A date filter default or request uses an unsupported expression or shapeValidation rejects the filter and no usable date value is producedUse TODAY, TODAY+/-N, or a valid YYYY-MM-DD date, then pass a valid date range object.
A select filter option metric uses an unsupported display formatValidation rejects the filter options before the dashboard model is acceptedUse a supported display format for the option metric.
A filter request contains an unknown name or wrong value typeThe server rejects the request before query renderingSend only declared filter names with values that match their type and multiple setting.
A filter col value is outside 1 through 12Validation rejects the dashboard before the filter layout is builtUse an integer filter span from 1 through 12 or omit the span.
A Vega-Lite spec has no view, embeds values, reserves the dac dataset, or points to a remote URLValidation blocks the chart from bypassing the widget data sourceDefine a view and load data through the widget query or inline data.
A second axis uses an unsupported chart, a non-number type, or overlaps the left axisValidation rejects the chart instead of allowing an ambiguous viewUse y2 only on line, area, bar, or combo charts. Assign each numeric value field to one axis.
A reference annotation uses an unsupported chart, invalid axis, or empty bandValidation rejects the chart or prevents a meaningful annotationUse reference lines and bands on line, area, bar, or forest charts with x/y axes and different band endpoints.
An xmr chart uses per-series maps for control limitsThe renderer cannot apply the bounds as intendedUse one yMin column and one yMax column for xmr control limits.
A format layer has an invalid operator, gradient shape, range, or pivot-only settingValidation rejects the table or pivot formattingUse supported operators and match gradient colors, anchors, units, and scaleBy scope.
A table group is blank, hides a grouped column after the first member, uses a group on a pivot table, or repeats collapse or freeze after the first column in a group blockValidation rejects the table layoutUse named groups on plain tables. Put hidden, collapse, and freeze controls on the first column only.
A widget column span is negative or larger than twelveValidation rejects the widget layoutOmit the span for automatic allocation or use a value from 1 through 12.
A semantic model format is invalid or a format-only inherited value is used as the required chart valueThe dashboard loses the intended display format or fails to validate the authored chart contractUse supported display formats and author the required value field separately from its display format.

Key files

FileWhy to read it
pkg/…/project.goDefines how dashboard, semantic, and theme paths form project context.
pkg/…/loader.goShows supported file discovery, YAML loading, and shared normalization.
pkg/…/jsloader.goShows the TSX authoring boundary and component-tree conversion.
pkg/…/jsrequire.goShows local JavaScript, TypeScript, JSX, and JSON module behavior.
pkg/…/model.goDefines the shared dashboard, widget, filter, layout, inline-data, pivot, note, and encoding contract.
pkg/…/format.goDefines semantic display-format inheritance and the difference between display defaults and authored values.
pkg/…/filter_values.goDefines canonical filter values and the fail-closed request check before query rendering.
pkg/…/semantic_query.goShows how model references in definitions become semantic query intent.
pkg/…/validator.goDefines the domain validity rules for layouts, sources, filters, notes, filter links, Vega-Lite specs, pivots, formats, sparklines, table groups, and encodings.
pkg/…/note_test.goShows that note dimensions, including an explicitly empty list, survive YAML and JSON round trips.
pkg/…/loader_test.goShows project discovery, semantic encoding defaults, format inheritance, filter option formats, and authored-value validation.
pkg/…/jsloader_test.goShows TSX data loading, module use, widget filter mappings, and widget tabs.
pkg/…/validator_test.goShows the validation guarantees for notes, filter links, source rules, inline data, tabs, charts, pivots, sparklines, filter spans, table groups, and formatting.
schemas/…/schema.jsonDefines the versioned YAML shape and encoding forms.
pkg/…/api.goShows how validated definitions become widget jobs and result data.
frontend/…/DashboardView.tsxShows how filters, tabs, rows, columns, and widget IDs become the page view.
frontend/…/format.tsShows how value and axis encodings affect display without changing data.
frontend/…/TableWidget.tsxShows table, pivot, image, sparkline, value selection, display, and conditional format behavior.
frontend/…/dashboardImage.tsDefines the safe URL boundary for query-driven images.
frontend/…/VegaLiteChart.tsxShows how widget data becomes the themed dac Vega-Lite dataset.
frontend/…/ChartWidget.tsxShows how chart encodings map result columns to visual channels.