Plot.plot({
title: "Sales by Region & Segment",
subtitle: html`<h3 style = "margin-bottom: 15px">Total Sales, All Dates</h3>`,
style: {fontSize: "14px"},
marginTop: 40,
marginBottom: 60,
marginLeft: 75,
x: {label: null},
y: {label: "Sales ($)"},
color: {legend: true},
marks: [
Plot.barY(stackedBarData,
Plot.groupX(
{y: "sum"},
{x: "Region",
y: "Sales",
fill: "Segment", opacity: 0.8,
tip: true})),
Plot.text(dataLabel, {x: "Region", y: "Sales", text: d => d3.format("$,d")(d.Sales), dy: -6, lineAnchor: "bottom"}),
Plot.ruleY([0])
],
grid: true
})