I ended up working it out and solution for interested folks is below:
Note: I find that the LT1 hr / Max Z2 hr is only touched on a few of my rides, since I do a lot of <LT1 or Z2 riding and avoid the top of the zone, so I dropped the target hr down to one that’s more common for me and then made it +/- 2bpm. So the chart has a target of 127bpm and picks up 125–129 bpm and calculates the power in that range, which you can then plot on a custom chart.
You’ll need to just edit the Script to match your own target Z2 hr, by replacing where I’ve got “127,” with whatever yours is.
You will need to reprocess files to get the new chart to show data, I just reprocessed a year (go to Activities, then view by columns, set range to 1 year, select the top empty check box and all the rides will be selected, then Edit → “Reprocess File”).
Instructions
Settings → Custom Fields → Add field
Name: [whatever]; Units: W; Type: Numeric; [everything else is just default on that page]
Description: (you can write anything)
Script: paste script below (edit the number “127 bpm” for your own target hr for which you want to track power)
// Power @ 127 bpm — LT1 proxy
hr_target = 127
hr_range = 2 // use ± 2 bpm
min_power = 80 // ignore coasting / stops
min_points = 120 // require at least 2 min of valid data
hrStr = streams.get(“fixed_heartrate”).data
pwrStr = streams.get(“fixed_watts”).data
count = 0
sumPower = 0
for (let i = 0; i < hrStr.length; i++) {
hr = hrStr[i]
pwr = pwrStr[i]
if (hr >= hr_target - hr_range &&
hr <= hr_target + hr_range &&
pwr >= min_power) {
count++
sumPower += pwr
}
}
if (count >= min_points) {
sumPower / count
} else {
null
}