specStocks = ({
$schema: "https://vega.github.io/schema/vega-lite/v5.json",
data: { values: stocks.objects() },
layer: [
{
mark: { type: "line" },
encoding: {
x: { field: "date", type: "temporal", scale: { type: "utc" } },
y: { field: "price", type: "quantitative" },
color: { field: "symbol", type: "nominal" }
}
}
]
})