chart_specs


Description

{“what”:“Chart definitions tied to a specific dataset version, each describing how to render a chart.”,“why”:“Without it, there is no persistent record of chart configurations per dataset version.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:04:48.810940388+00:00”}

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id uuid 2147483647 gen_random_uuid()

{“what”:“UUID primary key, generated by gen_random_uuid(), uniquely identifying each chart spec.”,“why”:“Provides a stable reference for updates, deletions, and foreign keys from other tables.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:04:48.856726326+00:00”}

dataset_version_id uuid 2147483647 null
dataset_versions.id chart_specs_dataset_version_id_fkey C

{“what”:“UUID referencing the dataset version this chart spec is associated with.”,“why”:“Ensures charts are bound to a specific data snapshot; without it, charts would be ambiguous across versions.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:04:48.927630343+00:00”}

title text 2147483647 null

{“what”:“Human-readable text label for the chart, used for display and identification.”,“why”:“Without it, charts cannot be distinguished in UI lists or reports.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:04:49.182597752+00:00”}

chart_type text 2147483647 null

{“what”:“Text indicating the chart kind, e.g., ‘bar’, ‘line’, ‘pie’.”,“why”:“Determines the rendering logic; without it, the chart cannot be drawn correctly.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:04:49.292035346+00:00”}

x_field text 2147483647 √ null

{“what”:“Name of the data field used for the x-axis; nullable if not applicable.”,“why”:“Defines the independent variable; without it, the chart lacks a horizontal axis mapping.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:04:49.353512233+00:00”}

y_fields _text 2147483647 '{}'::text[]

{“what”:“Array of field names for y-axis series; defaults to empty array.”,“why”:“Supports multi-series charts; without it, only a single series could be represented.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:04:49.441576870+00:00”}

sql text 2147483647 √ null

{“what”:“Custom SQL query text for data extraction; nullable if using standard fields.”,“why”:“Allows complex or custom queries beyond the simple x/y fields; without it, such charts are impossible.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:04:49.512568341+00:00”}

order_index int4 10 0

{“what”:“Integer specifying the display order among charts; defaults to 0.”,“why”:“Controls the sequence of charts in a dashboard; without it, ordering is undefined.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:04:49.523375731+00:00”}

Indexes

Constraint Name Type Sort Column(s)
chart_specs_pkey Primary key Asc id
chart_specs_version_idx Performance Asc/Asc dataset_version_id + order_index

Check Constraints

Constraint Name Constraint
chart_specs_chart_type_check (chart_type = ANY (ARRAY['line'::text, 'bar'::text, 'area'::text, 'scatter'::text, 'table'::text, 'map'::text]))

Relationships