Text mark for binned lines

So, I have the usual multiline Plot graph with labels placed at the end of the lines using the Text Mark and SelectLast. It works if the data comes already summarized but If I have to bin the data with plot.binX I cannot make it work.

¿What am I doing wrong?

Plot.text(
  delitos,
  Plot.selectLast(
    Plot.binX(
      { y: "sum", interval: d3.utcMonth, text: (d) => d.subtipo },
      {
        x: "fecha",
        y: "cantidad",
        z: "subtipo",
        textAnchor: "start",
        dx: 3,
        fill: "black"
      }
    )
  )
)

the reducer for text receives the bin data as input, so maybe do

text: (d) => d[0].subtipo