I have a plot to show a running total across time. It works fine, but I am stuck in showing the latest value at the end of a line chart. I tried a few options, shown below, the chart works, the tooltip shows the right values (running total), but the text values are showing the month totals but not the running totals.
Clearly I am missing something.
Plot.text(data_driver,
Plot.mapY("cumsum", {
x: (d) => new Date(d.d_month),
y: "d_count",
text: "d_count",
dy: -5,
tip: true,
})),
Thank you.