Help with multiple plots

Hi,

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:
SELECT
NOW() AS time,
cast(value as char) AS metric,
depth as value
FROM data
WHERE
type = ‘xx’ and
station = ‘siteB’ and
datetime in ($datetime)
ORDER BY metric

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