Multiple independent line marks

Using Observable Plot v0.6, I’d like to add more than one line mark with independent data to my plot and have the legend generated automatically. Using d3.js v7 to change the HTML body after running b ='body'):

color: {legend:true},
marks: [
Plot.lineY({length:6, title:"CH1"}, {y:[1,4,2,5,3,6],x:[1,2,3,4,5,6]}),
Plot.lineY({length:4, title:"CH2"}, {y:[2,4,1,5],x:[1,2.5,4.5,6]}),

But that produces neither a legend nor different colours.

I can directly control the colours like so:

color: {legend:true},
marks: [
Plot.lineY({length:6}, {y:[1,4,2,5,3,6],x:[1,2,3,4,5,6], stroke:"red"}),
Plot.lineY({length:4}, {y:[2,4,1,5],x:[1,2.5,4.5,6], stroke:"blue"}),

but there still is no legend.

Most examples I found assume all lines to use the same x points, but this is not true in my case. Also for my application I’d like to have 1000s of points, so a compact representation (like in the example above) would probably preferable over something like

  {x:1, y:1, ch:1},
  {x:2, y:4, ch:1},
  {x:3, y:2, ch:1},
  {x:4, y:5, ch:1},
  {x:5, y:3, ch:1},
  {x:6, y:6, ch:1},
  {x:1, y:2, ch:2},
  {x:2.5, y:4, ch:2},
  {x:4.5, y:1, ch:2},
  {x:6, y:5, ch:2}

but I’m open to re-arranging my data if really necessary.