Postgres separate line graph by character varying

Hey there, so I have a graph that looks like:

My table in postgres is structured like so:
name | amount | date_sent

I’d love to make it so each different name is a different color/selector in the graph. I tried grouping by the name column, but that didn’t get me very far. I read about creating virtual tags but I think those are just for InfluxDB?

Would love any help. Thanks!