Graph type time/status values

Hey, guys,
Could you advise me which chart to use and how to draw it?

I have data about the state of the switch, the time when the state changed and to what value it changed 0/1. I have 10 breakers.

I want to display all the switches in one graph,
I want to have information about how long it has been off and how long it has been on for a certain period of time.

Can you give me some advice?
Thank you.

Example data:

name: switch_2
time                value
----                -----
1697789014483000000 1
1697789018242000000 0
1697789019407000000 1

name: switch_1
time                value
----                -----
1697789014483000000 1
1697789018242000000 0
1697789019407000000 1

..... 
switch_10

welcome @duskohu

What is your data source? mysql? influxdb?

Hi, @yosiasz,
I have data from influxdb

If using Flux, I think this would be a good starting point.

Thx, I use IbfluxQl
I have InfluxDB shell version: 1.8.10

Here is something that may help you get started using InfluxQL: