Plot.plot({
marginLeft: 60,
marginBottom: 80,
title: "Negative Thoughts on 4/28 and some of 4/29",
x: {
label: "Time",
type: "band",
domain: timeOrder,
tickRotate: -45
},
y: {
label: "Intensity",
domain: [0, maxIntensity]
},
color: {
legend: true,
label: "Emotion"
},
marks: [
Plot.link(segments2, {x1: "x1", y1: "y1", x2: "x2", y2: "y2", stroke: "Emotion"}),
Plot.dot(thoughtsData, {
x: "Time",
y: "Intensity",
fill: "Emotion",
r: 5,
title: d => `Description: ${d.Description}\n\nPost-Game Analysis: ${d.Insights}`,
tip: true
})
]
});