Custom activity streams with Javascript

That works nicely - I have updated the stream definitions (including gear index and ratio - only difference was also keeping front/rear_gear_num). Hadn’t thought of using the “irrelevant” fit messages as a way to set the data. Not entirely sure I understand why it might work better, but it seems to have helped.

This 12-hour activity still fails with Memory limit exceeded though: i20126210

Using the “irrelevant” fit messages to set the gear just ensures that the currently selected gear is set for every data point in the file.

I have updated the memory limits to allow more for files with more data points (like that epic ride!). It worked when I tested it.

1 Like

it doesn’t show anything for me. I add custom graph from Intervals.icu
Dor example on : Intervals.icu Ican’t see gear selection.

I searched for and added front and rear gear custom streams to that activity and it works:

Then I searched for Johan’s custom chart with both traces and that also works:

You need to add the custom streams before the chart.

2 Likes

Thank you. It works great.

1 Like

Hi, when I use this with my sram etap group it seems that the previous values aren’t repeated till a new shift.
Is there a way to enable something like a “if null keep previous value” in charts? That would make this chart a lot clearer for moe

I updated the script for the custom stream plotted on that chart to use the previous value instead of null. Now the chart fills in nicely. You need to do Actions → Reprocess file to get this for other activities.

1 Like