Plot.plot({
x: {
grid: true,
nice: true
},
y: {
grid: true,
nice: true,
label: "Z-Score"
},
marks: [
Plot.lineY(data_standardized_filtered, {
x: "Date",
y: "CloseStandardized",
stroke: "salmon"
}),
Plot.dot(data_standardized_filtered, {
x: "Date",
y: "CloseStandardized",
fill: "salmon",
r: 1.5,
title: d => d["Close"].toFixed(1) + " USD",
opacity: 0
}),
Plot.lineY(data_standardized_filtered, {
x: "Date",
y: "VolumeStandardized",
stroke: "dodgerblue",
curve: "step"
}),
Plot.dot(data_standardized_filtered, {
x: "Date",
y: "VolumeStandardized",
fill: "dodgerblue",
r: 1.5,
title: d => (d["Volume"] / 1_000_000_000).toFixed(1) + " Billion USD",
opacity: 0
})
]
})