This kind of graph

I’m trying to build this kind of graph (img 1) based on the data I’m collecting from Prometheus data source but the closest that I get is a time series column graph split (img 2) by the time and not by the code.
Is this graph doable at Grafana or only at Excel? If so, what am I doing wrong?
Thanks in advance.

The graph I want to build:

The one that I built, which is not the expected: