chart_group = (id) => {
return Plot.plot({
height: 300,
x: {
nice: true,
type: "time",
format: (x) => x.toLocaleString("fr")
},
y: {
axis: null
},
marks: [
Plot.ruleY([0], { stroke: "#bbb" }),
Plot.line([groups[id][1][0], groups[id][1][groups[id][1].length - 1]], {
x: (d) => d3.utcParse("%s")(d.timestamp_utc),
y: 0,
stroke: (d) => group_scale(id),
...line_options
}),
Plot.dotX(groups[id][1], {
x: (d) => d3.utcParse("%s")(d.timestamp_utc),
fill: (d) => user_scale(d.rank),
...dot_options
})
]
});
}