W/Kg chart custom stream

Hello, i was trying to create a custom stream, i really have no idea on how to do it. I tried to read on forum and tried
{
let weight = wellness.weight
let watts = icu.streams.fixed_watts
for (let i = 0; i < data.length; i++) data[i] = watts[i] / weight[i]
}

but doesn’t work. Anyone have an idea on how to do it?

Use icu.streams.fixed_watts.length instead of data.length

1 Like

tried
{
let weight = activity.icu_weight
let watts = icu.streams.fixed_watts
for (let i = 0; i < icu.streams.fixed_watts.length; i++) data[i] = watts[i] / weight[i]
}

but still doesn’t work, chart is empty (activity as been reprocessed)

Try:

{
let weight = activity.icu_weight
let watts = icu.streams.fixed_watts
for (let i = 0; i < data.length; i++) data[i] = watts[i] / weight
}

1 Like

this works, thanks