Don't connect points when if timespan is over certain value

HI there,

I read this question multiple times, but didn’t find a solution for me yet.
I want the values not be connected if the time gab between 2 points is bigger than a certain value. I know there is a option where I can select “Don’t connect null values” but I have no null values.

Here is a snapshot of my data:

There is a gab of ~16hrs and here is the panel with this data:

I want to see this gab also in the panel. The values should not be connected if the time gap is bigger than 5seconds.
Is this somehow possible?

Here you can see my query how I get my data from the database:

you could change config dynamically maybe with js through Apache ECharts plugin for Grafana | Grafana Labs
but it’s look like hard work.

But maybe you can rethink your data format and display, could you not sum your close point to get an unique point every 5 sec ?
by grouping by 5 sec delta and stack option you should be able to do something like that.

PS: to my knowledge you can’t change dynamically panel option, base on data value.