How to set dynamic value in zones in addMarkedTimespan?

days: [0,1,2,3,4,5,6],
zones: [machines[i].zone ],
type: “dhx_time_block”,
sections: {timeline: machines[i].id}
When I use this code zones values not set dynamiclly, please advise me
@Alex_Neblett @anassder @Polina

Hello @Rijwan_Mohammed,

I tried to reproduce the issue with the following code to set dynamic zones parameter:

var i = 0;  
var machines = [{id: 20, zone: [8*60,12*60,15*60, 17*60]},
                {id: 30, zone: [8*60,12*60]},
                {id: 130, zone: [15*60, 17*60]},
                {id: 120, zone: [8*60,12*60,15*60, 17*60]}]
for (i = 0; i < machines.length; i++) {
    days: [0,1,2,3,4,5,6],
    type: "dhx_time_block",
    sections: { timeline: machines[i].id}

But it worked as expected, here is a demo:

The issue can be connected with some custom functionality or config combination. Unfortunately, currently, I can’t say for sure what is going wrong in your case without more details, so could you please reproduce it in the following demo(open the demo => reproduce the issue => click the “Share” button => post here the new link):

1 Like

Thanks you so much , i found what i doing wring