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