Plot.plot({
x: {label: "Year →"},
y: {label: "↑ Share Price ($)", grid: true},
color:{
legend: true,
tickFormat: d3.format(".2s"),
label: "Shares Traded per Day"
},
marks: [
Plot.dot(dataRaw, {
x: "Date",
y: "Close",
r: "Volume",
fill: "Volume",
fillOpacity: 0.6
}),
Plot.text(dataRaw, {
x: "Date",
y: "Close",
text: d => (d["High"] - d["Low"]) > 8 ? d["Date"] : "",
fill: "brown"
}),
Plot.linearRegressionY(dataRaw, {
x: "Date",
y: "Close",
stroke: "orange"
})
]
})