Help with multiple plots


I’m trying to find a way to create a single graph with multiple plots - when I don’t know the number of plots in advance. I want it to look more or less like the image below - where the amount of dates can vary:

So far, I managed to create separate graphs for each date by creating a variable for datetime:

Here’s my query for reference:
NOW() AS time,
cast(value as char) AS metric,
depth as value
FROM data
type = ‘xx’ and
station = ‘siteB’ and
datetime in ($datetime)
ORDER BY metric

I’d really appreciate any ideas that could help with this issue!