How to create a fitness chart for best pace ever until each date?

I would like to make a chart on the fitness view that contains the best pace that I have achieved for each distance from the beginning of my data until the date that I am representing on the graph.

I tried to do it using the max function, but the maximum period of time that I can consider is around 365 days. I imagine that it is possible to do it using the “formula” field, but I was not able to find the right way to do it.

For reference, what I want to create would be something similar to the yellow line in the picture.

On the Fitness page, you can do this

Add traces for every distance you’re interested in. The plot will show for any date range selected.

On the Pace page, this is a possibility

The legend shows your best performance per season and the date that it was achieved on.

@Rubinos12 If you want to plot your all time progress you can use the custom formula and pre days 1

So as an example for 8m:

bp= max(bp, best_power(480) ?? 0)

@R2Tom That is exactly what I am looking for I think, but I cant manage to make it work.

I am trying to use the best_pace function, as shown below, but it does not return any value at all. I have tried to do it also with 0 pre days and with really high values like 2000 and the result does not change (see “?” returned in every formula in the second picture)

It seems like the issue is the best pace function. It is not working for some reason. When I use it like below, which is the way that it autocompletes when I select it from add_plot, nothing appears. When I do it like in the second photo, it works without issues

Any idea how to fix it?

@MedTechCD The first thing you mention is what I tried first, but it seems like there is a limit of around one year in the number of days that I can select.

I want to keep track of how my PB for each distance progresses over time. Thus, I need to make sure that the interval covers from the beginning of my data. I do not care if my pace worsens. For example, if I run a 4:30 in 2022, a 4:35 in 2023 and a 4:25 in 2024, the line should stay at 4:30 until 2022 and change in 2024 to 4:25. If I never beat that time, it should stay there forever.

The second option is good for a year by year max, but not enough if I want to be able to easily identify every time I improved my PB.

Thank you and let me know if you have any suggestions :blush:

The max option seems limited to 365 days. Once you go to 366, the Days text goes red…

I’m afraid this functionality is only working with metrics in number format. Unfortunately, ‘best speed’ is not available either.
pinging @david to see if this can easily be implemented.

@MedTechCD Exactly. I have managed to do it with steps using the solution @R2Tom provided:
max_steps = max(max_steps, steps ?? 0)

It seems like there is some issue with the best_pace function in formulas. Either I use it wrong or there is a bug.

I hope quoting you is fine. @david can you provide any insight on why the best_pace function is not working in the formula?

max_steps = max(max_steps, steps ?? 0)

max_pace = max(max_pace, best_pace(1000, MINS_KM) ?? 0)

That makes a lot of sense. Let’s see what they say then. Thanks :grinning_face: