Skip to content

Commit 02c4383

Browse files
seanhancaclaude
andcommitted
site(play): ship explicit spec for the rides example
The "Bike rides by hour" chip had `spec: null` in the manifest — picking it only loaded the CSV and left whatever spec the editor already had. After picking, say, Quarterly revenue first, switching to rides left the editor on the quarterly spec (`field: "quarter"`), which then errored against rides.csv: Layer 0 encoding.x references field "quarter" which is not in the schema. Available columns: [hour, fare, rides] Fix: ship `site/play/examples/rides.spec.json` and reference it from the manifest. Every CSV-bearing example now ships an explicit spec — no entry in the gallery still depends on the editor's prior state. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent dbcbf81 commit 02c4383

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

site/play/examples/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Bike rides by hour",
66
"description": "The original playground example — 12-row CSV, bar chart of hourly rides.",
77
"csv": "examples/rides.csv",
8-
"spec": null
8+
"spec": "examples/rides.spec.json"
99
},
1010
{
1111
"id": "quarterly-revenue",

site/play/examples/rides.spec.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": "glyph/0.1",
3+
"title": "Bike rides by hour",
4+
"layers": [
5+
{
6+
"mark": "bar",
7+
"encoding": {
8+
"x": { "field": "hour", "type": "ordinal" },
9+
"y": { "field": "rides", "type": "quantitative" }
10+
}
11+
}
12+
]
13+
}

0 commit comments

Comments
 (0)