vl
.data(data)
.transform(
vl.calculate('datum.unixtime * 1000').as('timestamp'),
)
.layer(
vl.markLine()
.encode(
vl.x().fieldT("timestamp").title(""),
vl.y().fieldQ("tempF").title(null)
),
vl.markRule({
stroke: 'firebrick',
strokeDash: [2, 2]
})
.data([0])
.encode( vl.y().datum(185) ),
vl.markText({
align: 'center',
dx: 20,
dy: -134,
color: "firebrick"
})
.data([0])
.encode( vl.text().datum("Max Temp: 185˚F") ),
)
.render({renderer:"svg"})