Group by time and metric

We are trying to make a graph of daily deployments like GitHub - dora-team/fourkeys: Platform for monitoring the four key software delivery metrics of software delivery. In addition to it, we want to watch daily deployments group by git repositories.

Data of BigQuery is like this:

repository time_created

platform-api 2022-06-28T03:42:35.214Z
platform-admin 2022-06-29T02:07:18.220Z
platform-api 2022-06-29T07:07:03.695Z
platform-payment 2022-06-30T01:51:13.009Z
platform-payment 2022-06-30T01:51:14.184Z
platform-kyc 2022-06-30T05:13:56.187Z
platform-kyc 2022-06-30T06:24:29.761Z

I wrote query of Grafana as below


SELECT

TIMESTAMP_TRUNC(time_created, DAY) AS time,

COUNT(distinct deploy_id) AS deployments,

repository as metric

FROM

four_keys.deployments

GROUP BY time,metric

ORDER BY time

Currenly, graph of Grafana is

We are expecting for Grafana to shows like:

Does anyone know how to set a query to see like this?