dataface 0.1.6.dev558__py3-none-any.whl → 0.1.6.dev644__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dataface/DATAFACE_SYNTAX.md +18 -8
- dataface/agent_api/__init__.py +10 -1
- dataface/agent_api/cache.py +3 -2
- dataface/agent_api/data_paths.py +10 -4
- dataface/agent_api/docs/yaml-reference.md +23 -63
- dataface/agent_api/project_session.py +1 -1
- dataface/agent_api/render_face.py +1 -1
- dataface/agent_api/validate.py +4 -2
- dataface/cli/_error_format.py +13 -2
- dataface/cli/commands/render.py +100 -0
- dataface/cli/main.py +85 -28
- dataface/core/compile/compiler.py +8 -9
- dataface/core/compile/detect.py +8 -1
- dataface/core/compile/errors.py +18 -47
- dataface/core/compile/filter_injection.py +12 -2
- dataface/core/compile/jinja.py +54 -4
- dataface/core/compile/models/chart/authored.py +51 -134
- dataface/core/compile/models/chart/normalized.py +54 -13
- dataface/core/compile/models/chart/resolved.py +6 -6
- dataface/core/compile/models/query/authored.py +2 -44
- dataface/core/compile/models/query/normalized.py +3 -13
- dataface/core/compile/models/style/authored.py +3 -15
- dataface/core/compile/models/style/resolved.py +0 -3
- dataface/core/compile/models/style/theme.py +35 -31
- dataface/core/compile/normalize_charts.py +0 -14
- dataface/core/compile/normalize_variables.py +149 -31
- dataface/core/compile/normalizer.py +20 -5
- dataface/core/compile/parser.py +5 -22
- dataface/core/compile/schema_renderers/highlight_manifest.py +79 -0
- dataface/core/compile/schema_renderers/prompt.py +6 -3
- dataface/core/compile/schema_renderers/textmate_grammar.py +548 -0
- dataface/core/compile/schema_renderers/vscode_schema.py +0 -27
- dataface/core/compile/style_cascade.py +35 -13
- dataface/core/compile/yaml_error_formatter.py +28 -322
- dataface/core/defaults/themes/_base.yaml +27 -3
- dataface/core/errors/codes_compile.py +48 -0
- dataface/core/errors/structured.py +0 -4
- dataface/core/execute/__init__.py +0 -2
- dataface/core/execute/_duckdb_cache_base.py +8 -13
- dataface/core/execute/adapters/databricks_connection_manager.py +158 -0
- dataface/core/execute/adapters/dbt_adapter_factory.py +58 -18
- dataface/core/execute/adapters/sql_adapter.py +2 -3
- dataface/core/execute/cache_backend.py +7 -6
- dataface/core/execute/duckdb_cache.py +11 -285
- dataface/core/execute/executor.py +2 -218
- dataface/core/file_plugin.py +118 -0
- dataface/core/project.py +17 -39
- dataface/core/project_roots.py +10 -1
- dataface/core/render/chart/callout.py +296 -57
- dataface/core/render/chart/decisions.py +6 -2
- dataface/core/render/chart/pipeline.py +74 -48
- dataface/core/render/chart/profile.py +42 -46
- dataface/core/render/chart/rendering.py +1 -0
- dataface/core/render/chart/serialization.py +0 -5
- dataface/core/render/chart/spark.py +76 -2
- dataface/core/render/chart/standard_renderer.py +25 -31
- dataface/core/render/chart/table.py +387 -29
- dataface/core/render/chart/table_support.py +85 -31
- dataface/core/render/chart/vl_field_maps.py +5 -0
- dataface/core/render/layout_sizing.py +10 -3
- dataface/core/render/warnings/bar_color_1_to_1_with_x.py +2 -2
- dataface/core/serve/alias_index.py +16 -11
- dataface/core/serve/port.py +6 -1
- dataface/core/serve/server.py +6 -1
- dataface/data/highlighting/face/v1.json +82 -0
- dataface/integrations/highlighting.py +30 -1
- {dataface-0.1.6.dev558.dist-info → dataface-0.1.6.dev644.dist-info}/METADATA +1 -1
- {dataface-0.1.6.dev558.dist-info → dataface-0.1.6.dev644.dist-info}/RECORD +72 -68
- mdsvg/renderer.py +18 -2
- dataface/data/highlighting/sql_block_scalar_keys.json +0 -4
- {dataface-0.1.6.dev558.dist-info → dataface-0.1.6.dev644.dist-info}/WHEEL +0 -0
- {dataface-0.1.6.dev558.dist-info → dataface-0.1.6.dev644.dist-info}/entry_points.txt +0 -0
- {dataface-0.1.6.dev558.dist-info → dataface-0.1.6.dev644.dist-info}/licenses/LICENSE +0 -0
dataface/DATAFACE_SYNTAX.md
CHANGED
|
@@ -114,6 +114,12 @@ rows:
|
|
|
114
114
|
### Queries (named, parameterized, inline)
|
|
115
115
|
|
|
116
116
|
```yaml
|
|
117
|
+
variables:
|
|
118
|
+
region:
|
|
119
|
+
input: select
|
|
120
|
+
options:
|
|
121
|
+
static: [US, EU, APAC]
|
|
122
|
+
|
|
117
123
|
queries:
|
|
118
124
|
# Bare-string form — SQL inherits the face-level source
|
|
119
125
|
revenue: SELECT month, SUM(amount) AS total FROM orders GROUP BY 1 ORDER BY 1
|
|
@@ -342,6 +348,12 @@ Queries are the data layer. Charts reference queries by name; queries never embe
|
|
|
342
348
|
```yaml
|
|
343
349
|
source: my_profile # Optional: default source for every query below
|
|
344
350
|
|
|
351
|
+
variables:
|
|
352
|
+
region:
|
|
353
|
+
input: select
|
|
354
|
+
options:
|
|
355
|
+
static: [US, EU, APAC]
|
|
356
|
+
|
|
345
357
|
queries:
|
|
346
358
|
# SQL — the default. `type: sql` is implicit when `sql:` is present.
|
|
347
359
|
revenue: SELECT month, SUM(amount) AS total FROM orders GROUP BY 1 ORDER BY 1
|
|
@@ -423,6 +435,7 @@ Queries are Jinja-rendered before execution. Reference variables as bare names
|
|
|
423
435
|
```yaml
|
|
424
436
|
variables:
|
|
425
437
|
region: { input: select, options: { static: [US, EU, APAC] } }
|
|
438
|
+
period: { input: daterange }
|
|
426
439
|
|
|
427
440
|
queries:
|
|
428
441
|
sales:
|
|
@@ -503,22 +516,20 @@ charts:
|
|
|
503
516
|
y: total # column name OR [col, col, ...] for multi-series
|
|
504
517
|
color: segment # column | {value: "#ccc"} | {field, scale} | {field, when}
|
|
505
518
|
|
|
506
|
-
# Sizing —
|
|
519
|
+
# Sizing — height lives at chart root; aspect_ratio is a style field
|
|
507
520
|
height: 400 # exact px; bypasses aspect_ratio and min/max clamps
|
|
508
|
-
|
|
509
|
-
# height and aspect_ratio are ignored on kpi, table, callout, spark_bar
|
|
521
|
+
# height/aspect_ratio are ignored on kpi, table, callout, spark_bar
|
|
510
522
|
|
|
511
523
|
# Style + behavior
|
|
512
524
|
sort: { by: total, order: desc }
|
|
513
525
|
x_label: "Month"
|
|
514
526
|
y_label: "Revenue (USD)"
|
|
515
527
|
link: "/orders?month={{ month }}" # Click-through URL template (drill-down)
|
|
516
|
-
filters: { ... } # Result filters
|
|
517
528
|
|
|
518
529
|
style: # Chart-local style patch (typed; not raw CSS) — paint only
|
|
519
|
-
|
|
530
|
+
aspect_ratio: 2.0 # shape without a fixed size; height = width / aspect_ratio
|
|
520
531
|
number_format: ",.0f" # D3 format string or named alias for axis/tooltip format
|
|
521
|
-
|
|
532
|
+
# bar/area families also accept style.orientation and style.stack
|
|
522
533
|
```
|
|
523
534
|
|
|
524
535
|
### Chart types (29 total)
|
|
@@ -572,7 +583,6 @@ All chart types accept the channels and style fields below — but each type rej
|
|
|
572
583
|
| `background` | string \| object | Background channel — color, `{value}`, `{field, scale/when}`, or map layer |
|
|
573
584
|
| `sort` | object | `{by, order}` — categorical sort. Horizontal bar charts default to value-descending order when omitted. |
|
|
574
585
|
| `link` | string | Click-through URL template for drill-down links |
|
|
575
|
-
| `filters` | object | Post-execution row filters: `{col: var_name}` (implicit `eq`) or `{col: {op: var}}` where op is one of `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `like`, `ilike`, `in`, `not_in`, `between`. Implicit-eq values may also be Jinja templates (e.g. `"{{ region }}"`) resolved at execute time. A filter is skipped when the variable is `None`, `""`, or renders to `"none"`. |
|
|
576
586
|
| `layers` | list | Layer definitions for `type: layered` (see [Composition](#composition)) |
|
|
577
587
|
| `conditional_formatting` | object | Discrete style rules by column (see [Conditional formatting](#conditional-formatting)) |
|
|
578
588
|
| `data_table` | list | Attached mini-table beneath bar/line/area/layered (see [Composition](#composition)) |
|
|
@@ -585,7 +595,7 @@ All chart types accept the channels and style fields below — but each type rej
|
|
|
585
595
|
|
|
586
596
|
KPI-only fields: `value`, `label`, `support`. KPI uses `label:` for the header text — `title:` is rejected on KPI charts. `glyph` and `tone` moved into the style namespace: use `style.glyph.character` and `style.tone`. To override glyph/value color, use `style.kpi.glyph.font.color` / `style.kpi.value.font.color`.
|
|
587
597
|
|
|
588
|
-
Top-level chart fields shared by all types: `id`, `query`, `type`, `title`, `subtitle`, `description`, `height`, `aspect_ratio`, `style`, `link`, `
|
|
598
|
+
Top-level chart fields shared by all types: `id`, `query`, `type`, `title`, `subtitle`, `description`, `height`, `aspect_ratio`, `style`, `link`, `conditional_formatting`.
|
|
589
599
|
|
|
590
600
|
### Chart-type cheatsheet
|
|
591
601
|
|
dataface/agent_api/__init__.py
CHANGED
|
@@ -53,11 +53,18 @@ from dataface.agent_api.schema_hints import (
|
|
|
53
53
|
SchemaHints as SchemaHints,
|
|
54
54
|
schema_hints as schema_hints,
|
|
55
55
|
)
|
|
56
|
-
from dataface.agent_api.validate import
|
|
56
|
+
from dataface.agent_api.validate import (
|
|
57
|
+
ValidateDashboardArgs,
|
|
58
|
+
ValidateResult,
|
|
59
|
+
)
|
|
57
60
|
from dataface.agent_api.validate_query import (
|
|
58
61
|
QueryDiagnostic as QueryDiagnostic,
|
|
59
62
|
validate_query as validate_query,
|
|
60
63
|
)
|
|
64
|
+
from dataface.core.compile.compiler import (
|
|
65
|
+
CompileResult as CompileResult,
|
|
66
|
+
compile as compile,
|
|
67
|
+
)
|
|
61
68
|
from dataface.core.compile.config import ProjectSourcesConfig as ProjectSourcesConfig
|
|
62
69
|
from dataface.core.dashboard import (
|
|
63
70
|
RenderedDashboard as RenderedDashboard,
|
|
@@ -69,6 +76,8 @@ from dataface.core.render.board_links import LinkContext as LinkContext
|
|
|
69
76
|
from dataface.core.render.errors import RenderError as RenderError
|
|
70
77
|
|
|
71
78
|
__all__ = [
|
|
79
|
+
"compile",
|
|
80
|
+
"CompileResult",
|
|
72
81
|
"DescribeFaceArgs",
|
|
73
82
|
"DescribeFaceResult",
|
|
74
83
|
"DocsArgs",
|
dataface/agent_api/cache.py
CHANGED
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
from collections.abc import Generator
|
|
4
4
|
from contextlib import contextmanager
|
|
5
5
|
|
|
6
|
-
from dataface.core.execute.duckdb_cache import
|
|
6
|
+
from dataface.core.execute.duckdb_cache import open_cache_from_env
|
|
7
|
+
from dataface.core.execute.trivial_local_cache import TrivialDuckDBCache
|
|
7
8
|
|
|
8
9
|
__all__ = ["cache_from_env", "open_cache_from_env"]
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
@contextmanager
|
|
12
|
-
def cache_from_env() -> Generator[
|
|
13
|
+
def cache_from_env() -> Generator[TrivialDuckDBCache | None]:
|
|
13
14
|
"""Open DFT_CACHE_PATH-backed cache (or None) and close it on exit.
|
|
14
15
|
|
|
15
16
|
Use for CLI verbs and composition roots that need a cache scoped to
|
dataface/agent_api/data_paths.py
CHANGED
|
@@ -201,19 +201,25 @@ def build_alias_index_for_project(project: Project) -> AliasIndex:
|
|
|
201
201
|
def data_alias_errors_for_file(
|
|
202
202
|
face_file: Path,
|
|
203
203
|
source_names: frozenset[str],
|
|
204
|
+
project: Project,
|
|
204
205
|
) -> list[str]:
|
|
205
206
|
"""Read aliases from a face file and lint any /data/ prefixed ones.
|
|
206
207
|
|
|
207
|
-
|
|
208
|
-
|
|
208
|
+
Reads through *project* (the FilePlugin seam), so it works against a
|
|
209
|
+
git-blob store as well as the filesystem. Source-name check only — no DB
|
|
210
|
+
connection, no resolver. Called from the validate path which must stay
|
|
211
|
+
connection-free.
|
|
209
212
|
|
|
210
213
|
Returns a list of error message strings; empty means no data alias issues.
|
|
211
214
|
Silently returns [] when the file cannot be parsed (compile catches that).
|
|
212
215
|
"""
|
|
213
216
|
from dataface.core.serve.alias_index import read_aliases_from_file
|
|
214
217
|
|
|
218
|
+
# file_for_path raises ValueError when face_file is outside project.root —
|
|
219
|
+
# that is a caller bug, not a parse error, and must NOT be swallowed.
|
|
220
|
+
project_file = project.file_for_path(face_file)
|
|
215
221
|
try:
|
|
216
|
-
aliases = read_aliases_from_file(
|
|
222
|
+
aliases = read_aliases_from_file(project_file)
|
|
217
223
|
except ValueError:
|
|
218
|
-
return [] # compile path reports alias parse errors with
|
|
224
|
+
return [] # compile path reports alias-shape parse errors with context
|
|
219
225
|
return validate_data_aliases(aliases, source_names=source_names)
|
|
@@ -100,9 +100,8 @@ AuthoredQuery definition from YAML.
|
|
|
100
100
|
| `rows` | list[dict[str, Any]] | ✓ | Inline data rows for values-type queries (list of row dicts). |
|
|
101
101
|
| `values` | list[list[Any]] | ✓ | Inline column-oriented data for values-type queries (list of lists). |
|
|
102
102
|
| `description` | str | ✓ | Human-readable description of the query. Used by AI search and tooling. |
|
|
103
|
-
| `filters` | dict[str, Any] | ✓ |
|
|
103
|
+
| `filters` | dict[str, Any] | ✓ | Declarative column filters injected into the query's WHERE clause (SQL/DuckDB sources). |
|
|
104
104
|
| `limit` | int | ✓ | Maximum number of rows returned. |
|
|
105
|
-
| `pivot` | [Pivot](#pivot) | ✓ | Cross-tab pivot hint: transforms long-form SQL output into a wide table at render time (table consumers only). Does not affect SQL execution. |
|
|
106
105
|
| `ignore` | list[str] | ✓ | Diagnostic codes to suppress for this query (e.g., ['fanout_risk', 'reaggregation']). |
|
|
107
106
|
|
|
108
107
|
<a id="barchart"></a>
|
|
@@ -116,7 +115,6 @@ Authored patch for bar and histogram charts.
|
|
|
116
115
|
| `description` | str | ✓ | Human-readable description used by AI search and context tooltips. |
|
|
117
116
|
| `query` | str \| [Query](#query) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
118
117
|
| `link` | str | ✓ | Click-through URL template for drill-down links. |
|
|
119
|
-
| `filters` | dict[str, [FilterDef](#filterdef)] | ✓ | Declarative column filters applied to chart data after query execution. |
|
|
120
118
|
| `conditional_formatting` | dict[str, [FieldConditionalFormatting](#fieldconditionalformatting)] | ✓ | Discrete rule-driven style overrides indexed by column name. |
|
|
121
119
|
| `warnings_ignore` | list[str] | ✓ | Codes of render warnings to suppress for this chart. |
|
|
122
120
|
| `title` | str | ✓ | Chart title displayed above the chart (not used on type: kpi). |
|
|
@@ -144,7 +142,6 @@ Authored patch for line charts.
|
|
|
144
142
|
| `description` | str | ✓ | Human-readable description used by AI search and context tooltips. |
|
|
145
143
|
| `query` | str \| [Query](#query) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
146
144
|
| `link` | str | ✓ | Click-through URL template for drill-down links. |
|
|
147
|
-
| `filters` | dict[str, [FilterDef](#filterdef)] | ✓ | Declarative column filters applied to chart data after query execution. |
|
|
148
145
|
| `conditional_formatting` | dict[str, [FieldConditionalFormatting](#fieldconditionalformatting)] | ✓ | Discrete rule-driven style overrides indexed by column name. |
|
|
149
146
|
| `warnings_ignore` | list[str] | ✓ | Codes of render warnings to suppress for this chart. |
|
|
150
147
|
| `title` | str | ✓ | Chart title displayed above the chart (not used on type: kpi). |
|
|
@@ -172,7 +169,6 @@ Authored patch for area charts.
|
|
|
172
169
|
| `description` | str | ✓ | Human-readable description used by AI search and context tooltips. |
|
|
173
170
|
| `query` | str \| [Query](#query) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
174
171
|
| `link` | str | ✓ | Click-through URL template for drill-down links. |
|
|
175
|
-
| `filters` | dict[str, [FilterDef](#filterdef)] | ✓ | Declarative column filters applied to chart data after query execution. |
|
|
176
172
|
| `conditional_formatting` | dict[str, [FieldConditionalFormatting](#fieldconditionalformatting)] | ✓ | Discrete rule-driven style overrides indexed by column name. |
|
|
177
173
|
| `warnings_ignore` | list[str] | ✓ | Codes of render warnings to suppress for this chart. |
|
|
178
174
|
| `title` | str | ✓ | Chart title displayed above the chart (not used on type: kpi). |
|
|
@@ -200,7 +196,6 @@ Authored patch for scatter charts.
|
|
|
200
196
|
| `description` | str | ✓ | Human-readable description used by AI search and context tooltips. |
|
|
201
197
|
| `query` | str \| [Query](#query) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
202
198
|
| `link` | str | ✓ | Click-through URL template for drill-down links. |
|
|
203
|
-
| `filters` | dict[str, [FilterDef](#filterdef)] | ✓ | Declarative column filters applied to chart data after query execution. |
|
|
204
199
|
| `conditional_formatting` | dict[str, [FieldConditionalFormatting](#fieldconditionalformatting)] | ✓ | Discrete rule-driven style overrides indexed by column name. |
|
|
205
200
|
| `warnings_ignore` | list[str] | ✓ | Codes of render warnings to suppress for this chart. |
|
|
206
201
|
| `title` | str | ✓ | Chart title displayed above the chart (not used on type: kpi). |
|
|
@@ -230,7 +225,6 @@ Authored patch for heatmap charts.
|
|
|
230
225
|
| `description` | str | ✓ | Human-readable description used by AI search and context tooltips. |
|
|
231
226
|
| `query` | str \| [Query](#query) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
232
227
|
| `link` | str | ✓ | Click-through URL template for drill-down links. |
|
|
233
|
-
| `filters` | dict[str, [FilterDef](#filterdef)] | ✓ | Declarative column filters applied to chart data after query execution. |
|
|
234
228
|
| `conditional_formatting` | dict[str, [FieldConditionalFormatting](#fieldconditionalformatting)] | ✓ | Discrete rule-driven style overrides indexed by column name. |
|
|
235
229
|
| `warnings_ignore` | list[str] | ✓ | Codes of render warnings to suppress for this chart. |
|
|
236
230
|
| `title` | str | ✓ | Chart title displayed above the chart (not used on type: kpi). |
|
|
@@ -259,7 +253,6 @@ Authored patch for pie and donut charts.
|
|
|
259
253
|
| `description` | str | ✓ | Human-readable description used by AI search and context tooltips. |
|
|
260
254
|
| `query` | str \| [Query](#query) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
261
255
|
| `link` | str | ✓ | Click-through URL template for drill-down links. |
|
|
262
|
-
| `filters` | dict[str, [FilterDef](#filterdef)] | ✓ | Declarative column filters applied to chart data after query execution. |
|
|
263
256
|
| `conditional_formatting` | dict[str, [FieldConditionalFormatting](#fieldconditionalformatting)] | ✓ | Discrete rule-driven style overrides indexed by column name. |
|
|
264
257
|
| `warnings_ignore` | list[str] | ✓ | Codes of render warnings to suppress for this chart. |
|
|
265
258
|
| `title` | str | ✓ | Chart title displayed above the chart (not used on type: kpi). |
|
|
@@ -281,7 +274,6 @@ Authored patch for KPI (key performance indicator) charts.
|
|
|
281
274
|
| `description` | str | ✓ | Human-readable description used by AI search and context tooltips. |
|
|
282
275
|
| `query` | str \| [Query](#query) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
283
276
|
| `link` | str | ✓ | Click-through URL template for drill-down links. |
|
|
284
|
-
| `filters` | dict[str, [FilterDef](#filterdef)] | ✓ | Declarative column filters applied to chart data after query execution. |
|
|
285
277
|
| `conditional_formatting` | dict[str, [FieldConditionalFormatting](#fieldconditionalformatting)] | ✓ | Discrete rule-driven style overrides indexed by column name. |
|
|
286
278
|
| `warnings_ignore` | list[str] | ✓ | Codes of render warnings to suppress for this chart. |
|
|
287
279
|
| `label` | str | ✓ | KPI label rendered above the headline value. |
|
|
@@ -300,12 +292,14 @@ Authored patch for table charts.
|
|
|
300
292
|
| `description` | str | ✓ | Human-readable description used by AI search and context tooltips. |
|
|
301
293
|
| `query` | str \| [Query](#query) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
302
294
|
| `link` | str | ✓ | Click-through URL template for drill-down links. |
|
|
303
|
-
| `filters` | dict[str, [FilterDef](#filterdef)] | ✓ | Declarative column filters applied to chart data after query execution. |
|
|
304
295
|
| `conditional_formatting` | dict[str, [FieldConditionalFormatting](#fieldconditionalformatting)] | ✓ | Discrete rule-driven style overrides indexed by column name. |
|
|
305
296
|
| `warnings_ignore` | list[str] | ✓ | Codes of render warnings to suppress for this chart. |
|
|
306
297
|
| `title` | str | ✓ | Chart title displayed above the chart (not used on type: kpi). |
|
|
307
298
|
| `subtitle` | str | ✓ | Chart subtitle displayed below the title. |
|
|
308
299
|
| `style` | [TableChartStyle](#tablechartstyle) | ✓ | Chart-local style overrides. |
|
|
300
|
+
| `rows` | list[str] | ✓ | Fields whose distinct values form the row dimension of a pivot cross-tab. Each string is a column name from the query result. Omit for flat (non-pivot) tables. |
|
|
301
|
+
| `columns` | list[str] | ✓ | Fields whose distinct values become column headers in a pivot cross-tab. Multiple fields create a nested multi-dimension pivot (outer → inner). Omit for flat tables. |
|
|
302
|
+
| `values` | list[str] | ✓ | Measure fields that fill pivot cells. Each string is a column name from the query result. When omitted, all query columns not claimed by rows or columns are used. |
|
|
309
303
|
|
|
310
304
|
<a id="pointmapchart"></a>
|
|
311
305
|
## PointMapChart
|
|
@@ -318,7 +312,6 @@ Authored patch for point_map and bubble_map charts.
|
|
|
318
312
|
| `description` | str | ✓ | Human-readable description used by AI search and context tooltips. |
|
|
319
313
|
| `query` | str \| [Query](#query) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
320
314
|
| `link` | str | ✓ | Click-through URL template for drill-down links. |
|
|
321
|
-
| `filters` | dict[str, [FilterDef](#filterdef)] | ✓ | Declarative column filters applied to chart data after query execution. |
|
|
322
315
|
| `conditional_formatting` | dict[str, [FieldConditionalFormatting](#fieldconditionalformatting)] | ✓ | Discrete rule-driven style overrides indexed by column name. |
|
|
323
316
|
| `warnings_ignore` | list[str] | ✓ | Codes of render warnings to suppress for this chart. |
|
|
324
317
|
| `title` | str | ✓ | Chart title displayed above the chart (not used on type: kpi). |
|
|
@@ -346,7 +339,6 @@ Authored patch for map and geoshape charts.
|
|
|
346
339
|
| `description` | str | ✓ | Human-readable description used by AI search and context tooltips. |
|
|
347
340
|
| `query` | str \| [Query](#query) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
348
341
|
| `link` | str | ✓ | Click-through URL template for drill-down links. |
|
|
349
|
-
| `filters` | dict[str, [FilterDef](#filterdef)] | ✓ | Declarative column filters applied to chart data after query execution. |
|
|
350
342
|
| `conditional_formatting` | dict[str, [FieldConditionalFormatting](#fieldconditionalformatting)] | ✓ | Discrete rule-driven style overrides indexed by column name. |
|
|
351
343
|
| `warnings_ignore` | list[str] | ✓ | Codes of render warnings to suppress for this chart. |
|
|
352
344
|
| `title` | str | ✓ | Chart title displayed above the chart (not used on type: kpi). |
|
|
@@ -373,7 +365,6 @@ Authored patch for layered multi-mark charts.
|
|
|
373
365
|
| `description` | str | ✓ | Human-readable description used by AI search and context tooltips. |
|
|
374
366
|
| `query` | str \| [Query](#query) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
375
367
|
| `link` | str | ✓ | Click-through URL template for drill-down links. |
|
|
376
|
-
| `filters` | dict[str, [FilterDef](#filterdef)] | ✓ | Declarative column filters applied to chart data after query execution. |
|
|
377
368
|
| `conditional_formatting` | dict[str, [FieldConditionalFormatting](#fieldconditionalformatting)] | ✓ | Discrete rule-driven style overrides indexed by column name. |
|
|
378
369
|
| `warnings_ignore` | list[str] | ✓ | Codes of render warnings to suppress for this chart. |
|
|
379
370
|
| `title` | str | ✓ | Chart title displayed above the chart (not used on type: kpi). |
|
|
@@ -408,7 +399,6 @@ Authored patch for spark_bar charts (compact horizontal bars).
|
|
|
408
399
|
| `description` | str | ✓ | Human-readable description used by AI search and context tooltips. |
|
|
409
400
|
| `query` | str \| [Query](#query) \| QueryRef | ✓ | Named query reference, inline AuthoredQuery, or SQL string shorthand. |
|
|
410
401
|
| `link` | str | ✓ | Click-through URL template for drill-down links. |
|
|
411
|
-
| `filters` | dict[str, [FilterDef](#filterdef)] | ✓ | Declarative column filters applied to chart data after query execution. |
|
|
412
402
|
| `conditional_formatting` | dict[str, [FieldConditionalFormatting](#fieldconditionalformatting)] | ✓ | Discrete rule-driven style overrides indexed by column name. |
|
|
413
403
|
| `warnings_ignore` | list[str] | ✓ | Codes of render warnings to suppress for this chart. |
|
|
414
404
|
| `title` | str | ✓ | Chart title displayed above the chart (not used on type: kpi). |
|
|
@@ -510,25 +500,6 @@ Options configuration for variable inputs.
|
|
|
510
500
|
| `column` | str | ✓ | Column in the query result to use as option values. |
|
|
511
501
|
| `label_column` | str | ✓ | Column in the query result to use as display labels (separate from values). |
|
|
512
502
|
|
|
513
|
-
<a id="pivot"></a>
|
|
514
|
-
## Pivot
|
|
515
|
-
Query-level pivot rendering hint for cross-tab table layout.
|
|
516
|
-
|
|
517
|
-
| Field | Type | Description |
|
|
518
|
-
|-------|------|-------------|
|
|
519
|
-
| `column` | str | Dimension whose distinct values become column headers in the cross-tab layout. |
|
|
520
|
-
| `value` | str | Measure that fills each cell in the cross-tab layout. |
|
|
521
|
-
|
|
522
|
-
<a id="filterdef"></a>
|
|
523
|
-
## FilterDef
|
|
524
|
-
One column→variable binding in chart.filters.
|
|
525
|
-
|
|
526
|
-
| Field | Type | Optional | Description |
|
|
527
|
-
|-------|------|:--------:|-------------|
|
|
528
|
-
| `op` | enum: "eq", "neq", "gt", "gte", "lt", "lte", "like", "ilike", "in", "not_in", "between" | ✓ | Comparison operator. Defaults to 'eq'. |
|
|
529
|
-
| `var` | str | ✓ | Plain variable name (no Jinja). Set when the filter value is a dashboard variable reference. |
|
|
530
|
-
| `template` | str | ✓ | Jinja template resolved at execute time. Only valid with op='eq'. Set when conditional-disable or complex expressions are needed. |
|
|
531
|
-
|
|
532
503
|
<a id="fieldconditionalformatting"></a>
|
|
533
504
|
## FieldConditionalFormatting
|
|
534
505
|
Conditional formatting rules scoped to a single column.
|
|
@@ -578,7 +549,6 @@ Authored overlay for BarChartStyle. Bar chart style: chart-level fields + marks
|
|
|
578
549
|
| `animation_duration` | float | ✓ | Vega-Lite animation duration in milliseconds. Falls back to [`style.charts.animation_duration`](#chartsstyle). |
|
|
579
550
|
| `palette` | list[str] \| str | ✓ | Ordered list of categorical color stops or a palette name; expanded from a palette name at validation time. Falls back to [`style.charts.palette`](#chartsstyle). |
|
|
580
551
|
| `single_series_palette` | list[str] \| str | ✓ | Ordered list of single-series mark inks (must be non-empty), or a palette name. Cycled across single-series charts in face reading order. Falls back to [`style.charts.single_series_palette`](#chartsstyle). |
|
|
581
|
-
| `inference` | [InferenceStyle](#inferencestyle) | ✓ | Engine inference behavior flags. |
|
|
582
552
|
| `legend` | [LegendStyle](#legendstyle) | ✓ | Chart legend style. |
|
|
583
553
|
| `tooltip` | [TooltipStyle](#tooltipstyle) | ✓ | Per-chart-type tooltip style override; None uses the universal style.charts.tooltip. |
|
|
584
554
|
| `background` | str | ✓ | Chart-local background color override; None inherits from theme. |
|
|
@@ -595,7 +565,7 @@ Authored overlay for BarChartStyle. Bar chart style: chart-level fields + marks
|
|
|
595
565
|
| `range` | [RangeStyle](#rangestyle) | ✓ | Color range/palette overrides for this chart type; None means no override. |
|
|
596
566
|
| `data_table` | [DataTableStyle](#datatablestyle) | ✓ | Per-chart-type data_table style override. Unset fields fall back to [`style.charts.data_table`](#chartsstyle). |
|
|
597
567
|
| `orientation` | enum: "horizontal", "vertical", "auto" | ✓ | Preferred bar orientation; None uses the renderer default (vertical). |
|
|
598
|
-
| `stack` | enum: "zero", "normalize", "center" | ✓ | Default stack mode for bar charts;
|
|
568
|
+
| `stack` | enum: "none", "zero", "normalize", "center" | ✓ | Default stack mode for bar charts; none renders side-by-side columns. |
|
|
599
569
|
| `stack_order` | enum: "value", "data", "alphabetical" | ✓ | Z-order of stacked segments. None/'value' puts the largest aggregate at baseline. 'data' follows SQL row order (orientation-stable not guaranteed). 'alphabetical' sorts by color field name. Ignored when stacking is off or no color. |
|
|
600
570
|
| `endpoint_labels` | [EndpointLabelsConfig](#endpointlabelsconfig) | ✓ | Endpoint label pane configuration for bar charts. |
|
|
601
571
|
| `marks` | [BarChartMarksStyle](#barchartmarksstyle) | ✓ | Bar-family mark overrides. Unset fields fall back to [`style.charts.marks`](#chartsstyle). |
|
|
@@ -615,7 +585,6 @@ Authored overlay for LineChartStyle. Line chart style: chart-level fields + mark
|
|
|
615
585
|
| `animation_duration` | float | ✓ | Vega-Lite animation duration in milliseconds. Falls back to [`style.charts.animation_duration`](#chartsstyle). |
|
|
616
586
|
| `palette` | list[str] \| str | ✓ | Ordered list of categorical color stops or a palette name; expanded from a palette name at validation time. Falls back to [`style.charts.palette`](#chartsstyle). |
|
|
617
587
|
| `single_series_palette` | list[str] \| str | ✓ | Ordered list of single-series mark inks (must be non-empty), or a palette name. Cycled across single-series charts in face reading order. Falls back to [`style.charts.single_series_palette`](#chartsstyle). |
|
|
618
|
-
| `inference` | [InferenceStyle](#inferencestyle) | ✓ | Engine inference behavior flags. |
|
|
619
588
|
| `legend` | [LegendStyle](#legendstyle) | ✓ | Chart legend style. |
|
|
620
589
|
| `tooltip` | [TooltipStyle](#tooltipstyle) | ✓ | Per-chart-type tooltip style override; None uses the universal style.charts.tooltip. |
|
|
621
590
|
| `background` | str | ✓ | Chart-local background color override; None inherits from theme. |
|
|
@@ -649,7 +618,6 @@ Authored overlay for AreaChartStyle. Area chart style: chart-level fields + mark
|
|
|
649
618
|
| `animation_duration` | float | ✓ | Vega-Lite animation duration in milliseconds. Falls back to [`style.charts.animation_duration`](#chartsstyle). |
|
|
650
619
|
| `palette` | list[str] \| str | ✓ | Ordered list of categorical color stops or a palette name; expanded from a palette name at validation time. Falls back to [`style.charts.palette`](#chartsstyle). |
|
|
651
620
|
| `single_series_palette` | list[str] \| str | ✓ | Ordered list of single-series mark inks (must be non-empty), or a palette name. Cycled across single-series charts in face reading order. Falls back to [`style.charts.single_series_palette`](#chartsstyle). |
|
|
652
|
-
| `inference` | [InferenceStyle](#inferencestyle) | ✓ | Engine inference behavior flags. |
|
|
653
621
|
| `legend` | [LegendStyle](#legendstyle) | ✓ | Chart legend style. |
|
|
654
622
|
| `tooltip` | [TooltipStyle](#tooltipstyle) | ✓ | Per-chart-type tooltip style override; None uses the universal style.charts.tooltip. |
|
|
655
623
|
| `background` | str | ✓ | Chart-local background color override; None inherits from theme. |
|
|
@@ -665,7 +633,7 @@ Authored overlay for AreaChartStyle. Area chart style: chart-level fields + mark
|
|
|
665
633
|
| `scale` | [ScaleStyle](#scalestyle) | ✓ | Chart-type encoding scale overrides applied to both x and y; None means no override. |
|
|
666
634
|
| `range` | [RangeStyle](#rangestyle) | ✓ | Color range/palette overrides for this chart type; None means no override. |
|
|
667
635
|
| `data_table` | [DataTableStyle](#datatablestyle) | ✓ | Per-chart-type data_table style override. Unset fields fall back to [`style.charts.data_table`](#chartsstyle). |
|
|
668
|
-
| `stack` | enum: "zero", "normalize", "center" | ✓ | Default stack mode for area charts;
|
|
636
|
+
| `stack` | enum: "none", "zero", "normalize", "center" | ✓ | Default stack mode for area charts; none overlaps silhouettes. |
|
|
669
637
|
| `endpoint_labels` | [EndpointLabelsConfig](#endpointlabelsconfig) | ✓ | Endpoint label pane configuration for area charts. |
|
|
670
638
|
| `marks` | [AreaChartMarksStyle](#areachartmarksstyle) | ✓ | Area-family mark overrides. Unset fields fall back to [`style.charts.marks`](#chartsstyle). |
|
|
671
639
|
|
|
@@ -684,7 +652,6 @@ Authored overlay for ScatterChartStyle. Scatter chart style: chart-level fields
|
|
|
684
652
|
| `animation_duration` | float | ✓ | Vega-Lite animation duration in milliseconds. Falls back to [`style.charts.animation_duration`](#chartsstyle). |
|
|
685
653
|
| `palette` | list[str] \| str | ✓ | Ordered list of categorical color stops or a palette name; expanded from a palette name at validation time. Falls back to [`style.charts.palette`](#chartsstyle). |
|
|
686
654
|
| `single_series_palette` | list[str] \| str | ✓ | Ordered list of single-series mark inks (must be non-empty), or a palette name. Cycled across single-series charts in face reading order. Falls back to [`style.charts.single_series_palette`](#chartsstyle). |
|
|
687
|
-
| `inference` | [InferenceStyle](#inferencestyle) | ✓ | Engine inference behavior flags. |
|
|
688
655
|
| `legend` | [LegendStyle](#legendstyle) | ✓ | Chart legend style. |
|
|
689
656
|
| `tooltip` | [TooltipStyle](#tooltipstyle) | ✓ | Per-chart-type tooltip style override; None uses the universal style.charts.tooltip. |
|
|
690
657
|
| `background` | str | ✓ | Chart-local background color override; None inherits from theme. |
|
|
@@ -717,7 +684,6 @@ Authored overlay for HeatmapChartStyle. Heatmap chart style.
|
|
|
717
684
|
| `animation_duration` | float | ✓ | Vega-Lite animation duration in milliseconds. Falls back to [`style.charts.animation_duration`](#chartsstyle). |
|
|
718
685
|
| `palette` | list[str] \| str | ✓ | Ordered list of categorical color stops or a palette name; expanded from a palette name at validation time. Falls back to [`style.charts.palette`](#chartsstyle). |
|
|
719
686
|
| `single_series_palette` | list[str] \| str | ✓ | Ordered list of single-series mark inks (must be non-empty), or a palette name. Cycled across single-series charts in face reading order. Falls back to [`style.charts.single_series_palette`](#chartsstyle). |
|
|
720
|
-
| `inference` | [InferenceStyle](#inferencestyle) | ✓ | Engine inference behavior flags. |
|
|
721
687
|
| `legend` | [LegendStyle](#legendstyle) | ✓ | Chart legend style. |
|
|
722
688
|
| `tooltip` | [TooltipStyle](#tooltipstyle) | ✓ | Per-chart-type tooltip style override; None uses the universal style.charts.tooltip. |
|
|
723
689
|
| `background` | str | ✓ | Chart-local background color override; None inherits from theme. |
|
|
@@ -762,7 +728,6 @@ Authored overlay for PieChartStyle. Pie/donut chart style: geometry + total (fla
|
|
|
762
728
|
| `animation_duration` | float | ✓ | Vega-Lite animation duration in milliseconds. Falls back to [`style.charts.animation_duration`](#chartsstyle). |
|
|
763
729
|
| `palette` | list[str] \| str | ✓ | Ordered list of categorical color stops or a palette name; expanded from a palette name at validation time. Falls back to [`style.charts.palette`](#chartsstyle). |
|
|
764
730
|
| `single_series_palette` | list[str] \| str | ✓ | Ordered list of single-series mark inks (must be non-empty), or a palette name. Cycled across single-series charts in face reading order. Falls back to [`style.charts.single_series_palette`](#chartsstyle). |
|
|
765
|
-
| `inference` | [InferenceStyle](#inferencestyle) | ✓ | Engine inference behavior flags. |
|
|
766
731
|
| `legend` | [LegendStyle](#legendstyle) | ✓ | Chart legend style. |
|
|
767
732
|
| `tooltip` | [TooltipStyle](#tooltipstyle) | ✓ | Per-chart-type tooltip style override; None uses the universal style.charts.tooltip. |
|
|
768
733
|
| `background` | str | ✓ | Chart-local background color override; None inherits from theme. |
|
|
@@ -796,7 +761,6 @@ Authored overlay for KpiChartStyle. Produced by cascade from theme YAML.
|
|
|
796
761
|
| `animation_duration` | float | ✓ | Vega-Lite animation duration in milliseconds. Falls back to [`style.charts.animation_duration`](#chartsstyle). |
|
|
797
762
|
| `palette` | list[str] \| str | ✓ | Ordered list of categorical color stops or a palette name; expanded from a palette name at validation time. Falls back to [`style.charts.palette`](#chartsstyle). |
|
|
798
763
|
| `single_series_palette` | list[str] \| str | ✓ | Ordered list of single-series mark inks (must be non-empty), or a palette name. Cycled across single-series charts in face reading order. Falls back to [`style.charts.single_series_palette`](#chartsstyle). |
|
|
799
|
-
| `inference` | [InferenceStyle](#inferencestyle) | ✓ | Engine inference behavior flags. |
|
|
800
764
|
| `legend` | [LegendStyle](#legendstyle) | ✓ | Chart legend style. |
|
|
801
765
|
| `tooltip` | [TooltipStyle](#tooltipstyle) | ✓ | Per-chart-type tooltip style override; None uses the universal style.charts.tooltip. |
|
|
802
766
|
| `background` | str | ✓ | Chart-local background color override; None inherits from theme. |
|
|
@@ -825,7 +789,6 @@ Authored overlay for TableChartStyle. Table chart style overrides layered on top
|
|
|
825
789
|
| `animation_duration` | float | ✓ | Vega-Lite animation duration in milliseconds. Falls back to [`style.charts.animation_duration`](#chartsstyle). |
|
|
826
790
|
| `palette` | list[str] \| str | ✓ | Ordered list of categorical color stops or a palette name; expanded from a palette name at validation time. Falls back to [`style.charts.palette`](#chartsstyle). |
|
|
827
791
|
| `single_series_palette` | list[str] \| str | ✓ | Ordered list of single-series mark inks (must be non-empty), or a palette name. Cycled across single-series charts in face reading order. Falls back to [`style.charts.single_series_palette`](#chartsstyle). |
|
|
828
|
-
| `inference` | [InferenceStyle](#inferencestyle) | ✓ | Engine inference behavior flags. |
|
|
829
792
|
| `legend` | [LegendStyle](#legendstyle) | ✓ | Chart legend style. |
|
|
830
793
|
| `tooltip` | [TooltipStyle](#tooltipstyle) | ✓ | Per-chart-type tooltip style override; None uses the universal style.charts.tooltip. |
|
|
831
794
|
| `background` | str | ✓ | Table background color; None inherits from theme. |
|
|
@@ -883,7 +846,6 @@ Authored overlay for PointMapChartStyle. Point map chart style.
|
|
|
883
846
|
| `animation_duration` | float | ✓ | Vega-Lite animation duration in milliseconds. Falls back to [`style.charts.animation_duration`](#chartsstyle). |
|
|
884
847
|
| `palette` | list[str] \| str | ✓ | Ordered list of categorical color stops or a palette name; expanded from a palette name at validation time. Falls back to [`style.charts.palette`](#chartsstyle). |
|
|
885
848
|
| `single_series_palette` | list[str] \| str | ✓ | Ordered list of single-series mark inks (must be non-empty), or a palette name. Cycled across single-series charts in face reading order. Falls back to [`style.charts.single_series_palette`](#chartsstyle). |
|
|
886
|
-
| `inference` | [InferenceStyle](#inferencestyle) | ✓ | Engine inference behavior flags. |
|
|
887
849
|
| `legend` | [LegendStyle](#legendstyle) | ✓ | Chart legend style. |
|
|
888
850
|
| `tooltip` | [TooltipStyle](#tooltipstyle) | ✓ | Per-chart-type tooltip style override; None uses the universal style.charts.tooltip. |
|
|
889
851
|
| `background` | str | ✓ | Chart-local background color override; None inherits from theme. |
|
|
@@ -908,7 +870,6 @@ Authored overlay for GeoshapeChartStyle. Geoshape (choropleth) chart style.
|
|
|
908
870
|
| `animation_duration` | float | ✓ | Vega-Lite animation duration in milliseconds. Falls back to [`style.charts.animation_duration`](#chartsstyle). |
|
|
909
871
|
| `palette` | list[str] \| str | ✓ | Ordered list of categorical color stops or a palette name; expanded from a palette name at validation time. Falls back to [`style.charts.palette`](#chartsstyle). |
|
|
910
872
|
| `single_series_palette` | list[str] \| str | ✓ | Ordered list of single-series mark inks (must be non-empty), or a palette name. Cycled across single-series charts in face reading order. Falls back to [`style.charts.single_series_palette`](#chartsstyle). |
|
|
911
|
-
| `inference` | [InferenceStyle](#inferencestyle) | ✓ | Engine inference behavior flags. |
|
|
912
873
|
| `legend` | [LegendStyle](#legendstyle) | ✓ | Chart legend style. |
|
|
913
874
|
| `tooltip` | [TooltipStyle](#tooltipstyle) | ✓ | Per-chart-type tooltip style override; None uses the universal style.charts.tooltip. |
|
|
914
875
|
| `background` | str | ✓ | Chart-local background color override; None inherits from theme. |
|
|
@@ -959,7 +920,6 @@ Flat style patch for layered multi-mark charts.
|
|
|
959
920
|
| `animation_duration` | float | ✓ | Vega-Lite animation duration in milliseconds. Falls back to [`style.charts.animation_duration`](#chartsstyle). |
|
|
960
921
|
| `palette` | list[str] \| str | ✓ | Ordered list of categorical color stops or a palette name; expanded from a palette name at validation time. Falls back to [`style.charts.palette`](#chartsstyle). |
|
|
961
922
|
| `single_series_palette` | list[str] \| str | ✓ | Ordered list of single-series mark inks (must be non-empty), or a palette name. Cycled across single-series charts in face reading order. Falls back to [`style.charts.single_series_palette`](#chartsstyle). |
|
|
962
|
-
| `inference` | [InferenceStyle](#inferencestyle) | ✓ | Engine inference behavior flags. |
|
|
963
923
|
| `legend` | [LegendStyle](#legendstyle) | ✓ | Chart legend style overrides. |
|
|
964
924
|
| `tooltip` | [TooltipStyle](#tooltipstyle) | ✓ | Chart tooltip style overrides. |
|
|
965
925
|
| `background` | str | ✓ | Chart-local background color override; None inherits from theme. |
|
|
@@ -976,7 +936,7 @@ Flat style patch for layered multi-mark charts.
|
|
|
976
936
|
| `range` | [RangeStyle](#rangestyle) | ✓ | Color range/palette overrides for this chart type; None means no override. |
|
|
977
937
|
| `data_table` | [DataTableStyle](#datatablestyle) | ✓ | Per-chart-type data_table style override. Unset fields fall back to [`style.charts.data_table`](#chartsstyle). |
|
|
978
938
|
| `orientation` | enum: "horizontal", "vertical", "auto" | ✓ | Preferred bar orientation; None uses the renderer default (vertical). |
|
|
979
|
-
| `stack` | enum: "zero", "normalize", "center" | ✓ | Default stack mode for bar/area charts. |
|
|
939
|
+
| `stack` | enum: "none", "zero", "normalize", "center" | ✓ | Default stack mode for bar/area charts. |
|
|
980
940
|
| `stack_order` | enum: "value", "data", "alphabetical" | ✓ | Z-order of stacked segments. |
|
|
981
941
|
| `endpoint_labels` | [EndpointLabelsConfig](#endpointlabelsconfig) | ✓ | Endpoint label pane configuration. |
|
|
982
942
|
| `marks` | [LayeredMarksStyle](#layeredmarksstyle) | ✓ | Per-mark-type style overrides (bar/line/area/point). |
|
|
@@ -1102,7 +1062,7 @@ Authored overlay for TitleStyle. Board and face titles.
|
|
|
1102
1062
|
| `min_height` | float | ✓ | Minimum title row height in pixels. |
|
|
1103
1063
|
| `overflow` | str | ✓ | Text overflow mode (clip, truncate, wrap-two, wrap). |
|
|
1104
1064
|
| `position` | [TitlePositionStyle](#titlepositionstyle) | ✓ | Vega-Lite title positioning: anchor, angle, offset, baseline. |
|
|
1105
|
-
| `level` | enum: "auto" | ✓ | Heading level override for face titles. ``'auto'`` (default) computes the level semantically as the count of titled ancestors. An integer value locks all titles in this face and its descendants to that H-level. |
|
|
1065
|
+
| `level` | int \| enum: "auto" | ✓ | Heading level override for face titles. ``'auto'`` (default) computes the level semantically as the count of titled ancestors. An integer value locks all titles in this face and its descendants to that H-level. |
|
|
1106
1066
|
| `subtitle` | [TitleSubtitleStyle](#titlesubtitlestyle) | ✓ | Subtitle font styles. |
|
|
1107
1067
|
|
|
1108
1068
|
<a id="textstyle"></a>
|
|
@@ -1142,7 +1102,6 @@ Authored overlay for ChartsStyle. Registry of all chart-type styles plus shared
|
|
|
1142
1102
|
| `animation_duration` | float | ✓ | Vega-Lite animation duration in milliseconds. |
|
|
1143
1103
|
| `palette` | list[str] \| str | ✓ | Ordered list of categorical color stops or a palette name; expanded from a palette name at validation time. |
|
|
1144
1104
|
| `single_series_palette` | list[str] \| str | ✓ | Ordered list of single-series mark inks (must be non-empty), or a palette name. Cycled across single-series charts in face reading order. |
|
|
1145
|
-
| `inference` | [InferenceStyle](#inferencestyle) | ✓ | Engine inference behavior flags. |
|
|
1146
1105
|
| `legend` | [LegendStyle](#legendstyle) | ✓ | Chart legend style. |
|
|
1147
1106
|
| `tooltip` | [TooltipStyle](#tooltipstyle) | ✓ | Chart tooltip style. |
|
|
1148
1107
|
| `background` | str | ✓ | Chart canvas background; None inherits from the board background via apply_inherit. Falls back to [`style.background`](#style). |
|
|
@@ -1335,15 +1294,6 @@ Authored overlay for PaddingStyle. Per-chart padding inset (px). All 4 sides req
|
|
|
1335
1294
|
| `top` | float | ✓ | Top padding in pixels. |
|
|
1336
1295
|
| `bottom` | float | ✓ | Bottom padding in pixels. |
|
|
1337
1296
|
|
|
1338
|
-
<a id="inferencestyle"></a>
|
|
1339
|
-
## InferenceStyle
|
|
1340
|
-
Authored overlay for InferenceStyle.
|
|
1341
|
-
|
|
1342
|
-
| Field | Type | Optional | Description |
|
|
1343
|
-
|-------|------|:--------:|-------------|
|
|
1344
|
-
| `infer_zero_when_missing` | bool | ✓ | Auto-infer zero-baseline when not authored. |
|
|
1345
|
-
| `infer_fields_when_missing` | bool | ✓ | Auto-infer chart fields (x, y, etc.) when not authored. |
|
|
1346
|
-
|
|
1347
1297
|
<a id="legendstyle"></a>
|
|
1348
1298
|
## LegendStyle
|
|
1349
1299
|
Authored overlay for LegendStyle.
|
|
@@ -1417,7 +1367,7 @@ Authored overlay for ScaleStyle. Scale configuration primitive.
|
|
|
1417
1367
|
| `point_padding` | float | ✓ | Padding fraction for point scales; None uses Vega-Lite's default. |
|
|
1418
1368
|
| `rect_band_padding_inner` | float | ✓ | Inner padding fraction for rect band scales; None uses Vega-Lite's default. |
|
|
1419
1369
|
| `round` | bool | ✓ | Round scale outputs to nearest integer; None uses Vega-Lite's default (no rounding). |
|
|
1420
|
-
| `zero` | bool | ✓ | Force scale
|
|
1370
|
+
| `zero` | bool \| enum: "auto" | ✓ | Force scale zero-baseline: True/False pins it; "auto" runs the Dataface smart-zero heuristic; None passes through to Vega-Lite. |
|
|
1421
1371
|
| `clamp` | bool | ✓ | Clamp values to scale domain; None uses Vega-Lite's default (no clamping). |
|
|
1422
1372
|
| `continuous_padding` | float | ✓ | Padding in pixels for continuous scales; None uses Vega-Lite's default. |
|
|
1423
1373
|
| `band` | [ScaleBandStyle](#scalebandstyle) | ✓ | Band mark size constraints; None uses Vega-Lite's defaults. |
|
|
@@ -1654,7 +1604,7 @@ Configuration for a single table column.
|
|
|
1654
1604
|
|-------|------|:--------:|-------------|
|
|
1655
1605
|
| `label` | str | ✓ | Display header label (defaults to column name). |
|
|
1656
1606
|
| `format` | str \| [FormatConfig](#formatconfig) | ✓ | Number format (D3 string, preset name, or FormatConfig). |
|
|
1657
|
-
| `spark` | enum: "line", "area", "bar", "bar-normalize", "columns" | ✓ | Inline spark chart config or spark type name. |
|
|
1607
|
+
| `spark` | enum: "line", "area", "bar", "bar-normalize", "column", "columns" | ✓ | Inline spark chart config or spark type name. |
|
|
1658
1608
|
| `swatch` | bool | ✓ | When True, render this column's cells as small rounded color squares instead of text. Cell value must be a CSS color string (e.g. '#3164a3'). Useful for series-keyed tables — e.g. a 'Series' column where each row is identified by its color in the parent chart's palette. |
|
|
1659
1609
|
| `width` | int \| str | ✓ | Column width (integer pixels or CSS string like '10%'). |
|
|
1660
1610
|
| `max_width` | int \| str | ✓ | Maximum column width for auto-sized text columns (integer pixels or CSS string like '30%'). Cannot be set together with width:. |
|
|
@@ -1702,6 +1652,7 @@ Authored overlay for SparkStyle. Inline sparkline defaults (inside table cells).
|
|
|
1702
1652
|
| `empty` | [SparkEmptyStyle](#sparkemptystyle) | ✓ | Style for empty/no-data sparklines. |
|
|
1703
1653
|
| `single_value` | [SparkSingleValueStyle](#sparksinglevaluestyle) | ✓ | Style for single-data-point sparklines. |
|
|
1704
1654
|
| `columns` | [SparkColumnsStyle](#sparkcolumnsstyle) | ✓ | Style for column-type sparklines. |
|
|
1655
|
+
| `column` | [SparkColumnStyle](#sparkcolumnstyle) | ✓ | Style for the single vertical `column` spark mark. |
|
|
1705
1656
|
| `bar` | [SparkBarCellStyle](#sparkbarcellstyle) | ✓ | Style for bar/bar-normalize sparklines. |
|
|
1706
1657
|
| `area` | [SparkAreaStyle](#sparkareastyle) | ✓ | Style for area sparklines. |
|
|
1707
1658
|
|
|
@@ -1944,7 +1895,6 @@ Authored overlay for HistogramChartStyle. Histogram chart style.
|
|
|
1944
1895
|
| `animation_duration` | float | ✓ | Vega-Lite animation duration in milliseconds. Falls back to [`style.charts.animation_duration`](#chartsstyle). |
|
|
1945
1896
|
| `palette` | list[str] \| str | ✓ | Ordered list of categorical color stops or a palette name; expanded from a palette name at validation time. Falls back to [`style.charts.palette`](#chartsstyle). |
|
|
1946
1897
|
| `single_series_palette` | list[str] \| str | ✓ | Ordered list of single-series mark inks (must be non-empty), or a palette name. Cycled across single-series charts in face reading order. Falls back to [`style.charts.single_series_palette`](#chartsstyle). |
|
|
1947
|
-
| `inference` | [InferenceStyle](#inferencestyle) | ✓ | Engine inference behavior flags. |
|
|
1948
1898
|
| `legend` | [LegendStyle](#legendstyle) | ✓ | Chart legend style. |
|
|
1949
1899
|
| `tooltip` | [TooltipStyle](#tooltipstyle) | ✓ | Per-chart-type tooltip style override; None uses the universal style.charts.tooltip. |
|
|
1950
1900
|
| `background` | str | ✓ | Chart-local background color override; None inherits from theme. |
|
|
@@ -2119,7 +2069,7 @@ Scale configuration for a single style target (background or color).
|
|
|
2119
2069
|
| `min` | float \| int | ✓ | Minimum scale domain value (overrides data minimum). |
|
|
2120
2070
|
| `max` | float \| int | ✓ | Maximum scale domain value (overrides data maximum). |
|
|
2121
2071
|
| `null_color` | str | ✓ | Color assigned to null values. |
|
|
2122
|
-
| `hinge` | enum: "auto" | ✓ | Diverging scale midpoint value, or 'auto' to use the data midpoint. |
|
|
2072
|
+
| `hinge` | float \| enum: "auto" | ✓ | Diverging scale midpoint value, or 'auto' to use the data midpoint. |
|
|
2123
2073
|
| `arm_mode` | enum: "asymmetric", "symmetric" | ✓ | How diverging scale arms are stretched: 'asymmetric' (proportional) or 'symmetric' (equal arms). |
|
|
2124
2074
|
|
|
2125
2075
|
<a id="axisgridstyle"></a>
|
|
@@ -2306,6 +2256,7 @@ Authored overlay for SliceMarkStyle. Pie/donut slice mark — mark-level paint a
|
|
|
2306
2256
|
|
|
2307
2257
|
| Field | Type | Optional | Description |
|
|
2308
2258
|
|-------|------|:--------:|-------------|
|
|
2259
|
+
| `opacity` | float | ✓ | Arc slice opacity (0–1); None means not overridden at this level. |
|
|
2309
2260
|
| `gap` | float | ✓ | Angular gap between slices in radians. |
|
|
2310
2261
|
| `corner_radius` | float | ✓ | Corner radius of arc slices in pixels. |
|
|
2311
2262
|
| `stroke` | [StrokeStyle](#strokestyle) | ✓ | Arc slice stroke style. |
|
|
@@ -2334,7 +2285,7 @@ Configuration for spark charts (inline sparklines) in table columns.
|
|
|
2334
2285
|
|
|
2335
2286
|
| Field | Type | Optional | Description |
|
|
2336
2287
|
|-------|------|:--------:|-------------|
|
|
2337
|
-
| `type` | enum: "line", "area", "bar", "bar-normalize", "columns" | ✓ | Spark chart type (line, area, bar, bar-normalize, columns). |
|
|
2288
|
+
| `type` | enum: "line", "area", "bar", "bar-normalize", "column", "columns" | ✓ | Spark chart type (line, area, bar, bar-normalize, column, columns). |
|
|
2338
2289
|
| `color` | str | ✓ | Color for the spark mark. |
|
|
2339
2290
|
| `height` | int | ✓ | Spark chart height in pixels. |
|
|
2340
2291
|
| `width` | int | ✓ | Spark chart width in pixels. |
|
|
@@ -2386,6 +2337,15 @@ Authored overlay for SparkColumnsStyle. Inline `spark.type: columns` (multi-valu
|
|
|
2386
2337
|
| `min_bar_height` | float | ✓ | Minimum rendered bar height in pixels. |
|
|
2387
2338
|
| `border` | [BorderStyle](#borderstyle) | ✓ | Column bar border style. |
|
|
2388
2339
|
|
|
2340
|
+
<a id="sparkcolumnstyle"></a>
|
|
2341
|
+
## SparkColumnStyle
|
|
2342
|
+
Authored overlay for SparkColumnStyle. Inline `spark.type: column` (single vertical bar) defaults.
|
|
2343
|
+
|
|
2344
|
+
| Field | Type | Optional | Description |
|
|
2345
|
+
|-------|------|:--------:|-------------|
|
|
2346
|
+
| `width` | float | ✓ | Spark column default width in pixels. |
|
|
2347
|
+
| `height` | float | ✓ | Spark column default height in pixels. |
|
|
2348
|
+
|
|
2389
2349
|
<a id="sparkbarcellstyle"></a>
|
|
2390
2350
|
## SparkBarCellStyle
|
|
2391
2351
|
Authored overlay for SparkBarCellStyle. Inline `spark.type: bar` and `bar-normalize` (single horizontal bar) defaults.
|
|
@@ -124,7 +124,7 @@ class ProjectSession:
|
|
|
124
124
|
"""Construct a ProjectSession rooted at *project_dir*.
|
|
125
125
|
|
|
126
126
|
Cache lifecycle belongs to the caller: pass ``cache=open_cache_from_env()``
|
|
127
|
-
(or another
|
|
127
|
+
(or another cache backend) when persistent caching is desired, otherwise omit
|
|
128
128
|
and the project will run uncached. ``close()`` does not touch the cache —
|
|
129
129
|
whoever opened it closes it.
|
|
130
130
|
|
|
@@ -45,7 +45,7 @@ def render_face(
|
|
|
45
45
|
use_cache: Whether to use the in-memory Executor result cache.
|
|
46
46
|
cache: Optional DuckDB query-result cache. When provided, the caller
|
|
47
47
|
owns the cache lifecycle and must close it. The DuckDB cache is
|
|
48
|
-
*not* read from DFT_CACHE_PATH — pass an open
|
|
48
|
+
*not* read from DFT_CACHE_PATH — pass an open cache backend to
|
|
49
49
|
enable caching (see ``open_cache_from_env`` in
|
|
50
50
|
``dataface.core.execute.duckdb_cache``).
|
|
51
51
|
**options: Additional render options (e.g. ``scale`` for PNG).
|
dataface/agent_api/validate.py
CHANGED
|
@@ -170,7 +170,7 @@ def _validate_meta_file(path: Path) -> ValidateResult:
|
|
|
170
170
|
DatafaceError.from_code(
|
|
171
171
|
DF_COMPILE_META_SCHEMA,
|
|
172
172
|
message=(
|
|
173
|
-
f"{'
|
|
173
|
+
f"{'.'.join(str(loc) for loc in e['loc'])}: {e['msg']}"
|
|
174
174
|
if e["loc"]
|
|
175
175
|
else e["msg"]
|
|
176
176
|
),
|
|
@@ -258,7 +258,9 @@ def annotate_with_data_lint(
|
|
|
258
258
|
if not result.path.exists() or not result.path.is_file():
|
|
259
259
|
annotated.append(result)
|
|
260
260
|
continue
|
|
261
|
-
alias_msgs = data_alias_errors_for_file(
|
|
261
|
+
alias_msgs = data_alias_errors_for_file(
|
|
262
|
+
result.path, source_names=source_names, project=project_session.project
|
|
263
|
+
)
|
|
262
264
|
if not alias_msgs:
|
|
263
265
|
annotated.append(result)
|
|
264
266
|
continue
|
dataface/cli/_error_format.py
CHANGED
|
@@ -21,6 +21,18 @@ from dataface.core.errors import StructuredError
|
|
|
21
21
|
from dataface.core.render.warnings.base import RenderWarning
|
|
22
22
|
|
|
23
23
|
|
|
24
|
+
def _display_path(abs_path: str, line: int | None, cwd: Path | None = None) -> str:
|
|
25
|
+
"""Return path relative to cwd when possible, with optional :line suffix."""
|
|
26
|
+
p = Path(abs_path)
|
|
27
|
+
base = cwd if cwd is not None else Path.cwd()
|
|
28
|
+
try:
|
|
29
|
+
rel = p.relative_to(base)
|
|
30
|
+
display = str(rel)
|
|
31
|
+
except ValueError:
|
|
32
|
+
display = abs_path
|
|
33
|
+
return f"{display}:{line}" if line else display
|
|
34
|
+
|
|
35
|
+
|
|
24
36
|
def print_structured_errors(
|
|
25
37
|
errs: list[StructuredError],
|
|
26
38
|
*,
|
|
@@ -42,8 +54,7 @@ def print_structured_errors(
|
|
|
42
54
|
if e.hint:
|
|
43
55
|
body_parts.append(f"[dim]Hint:[/] {e.hint}")
|
|
44
56
|
if e.file:
|
|
45
|
-
|
|
46
|
-
body_parts.append(f"[dim]At:[/] {loc}")
|
|
57
|
+
body_parts.append(f"[dim]At:[/] {_display_path(e.file, e.line)}")
|
|
47
58
|
if e.docs_topic:
|
|
48
59
|
body_parts.append(f"[dim]Docs:[/] dft docs {e.docs_topic}")
|
|
49
60
|
elif e.doc_url:
|