line
Loading Example... ⏳
Specification
js
import * as vg from "@uwdata/vgplot";
await vg.coordinator().exec([
vg.loadParquet("aapl", "data/stocks.parquet", {where: "Symbol = 'AAPL'"})
]);
export default vg.plot(
vg.lineY(
vg.from("aapl"),
{x: "Date", y: "Close"}
),
vg.width(680),
vg.height(200)
);yaml
data:
aapl: { file: data/stocks.parquet, where: Symbol = 'AAPL' }
plot:
- mark: lineY
data: { from: aapl }
x: Date
y: Close
width: 680
height: 200json
{
"data": {
"aapl": {
"file": "data/stocks.parquet",
"where": "Symbol = 'AAPL'"
}
},
"plot": [
{
"mark": "lineY",
"data": {
"from": "aapl"
},
"x": "Date",
"y": "Close"
}
],
"width": 680,
"height": 200
}py
import vgplot as vg
aapl = vg.parquet("data/stocks.parquet", where="Symbol = 'AAPL'")
view = vg.plot(
vg.line_y(aapl, x="Date", y="Close"),
vg.width(680),
vg.height(200),
)