Colorize Curves of User Charts Tiles in Overview

203 views
Skip to first unread message

gilles....@gmail.com

unread,
Feb 13, 2026, 8:00:57 AMFeb 13
to golden-cheetah-users
Capture d'écran 2026-02-13 134303.pngHello

I would like to colorize the %CP curve of User Charts Tiles in Overview as following :
Capture d'écran 2026-02-13 135022.png
Expected results, currently available in the Ride tab using a user data curve:
Capture d'écran 2026-02-13 134303.png
But currently, the configuration of colors using a zone string is unavailable in a User Chart Tile (monochrome Red) :
Capture d'écran 2026-02-13 134954.png

Would it be possible to do it in some way?
If not, could developpers plan it in the future improvments? 

In fact, I wanted to configure an overview similar as intervals.icu :
Capture d'écran 2026-02-13 135955.png

Thanks in advance

Best regards

Gilles

Ale Martinez

unread,
Feb 13, 2026, 11:51:35 AMFeb 13
to golden-cheetah-users
El viernes, 13 de febrero de 2026 a la(s) 8:00:57 a.m. UTC-5, gilles....@gmail.com escribió:
Capture d'écran 2026-02-13 134303.pngHello

I would like to colorize the %CP curve of User Charts Tiles in Overview as following :
Capture d'écran 2026-02-13 135022.png
Expected results, currently available in the Ride tab using a user data curve:
Capture d'écran 2026-02-13 134303.png
But currently, the configuration of colors using a zone string is unavailable in a User Chart Tile (monochrome Red) :
Capture d'écran 2026-02-13 134954.png

Would it be possible to do it in some way?
If not, could developpers plan it in the future improvments? 

IIRC there was a comment from Mark when he implemented User charts about the lack of support for changing curve colors using Qt Charts, I don’t know if this restriction still applies.

marcen

unread,
Feb 13, 2026, 10:52:56 PMFeb 13
to golden-cheetah-users
Hello,

Here is a draft that uses the athlete zones to represent the individual zones in color. Bildschirmfoto_20260213_233655.png
Activitie – colored by zone.gchart

Mark Liversedge

unread,
Feb 14, 2026, 2:45:48 AMFeb 14
to golden-cheetah-users
On Friday, 13 February 2026 at 16:51:35 UTC Ale Martinez wrote:
IIRC there was a comment from Mark when he implemented User charts about the lack of support for changing curve colors using Qt Charts, I don’t know if this restriction still applies.

Yeah- when I did this it was possible in QWT with a patch, but not available in Qt Charts.
I don't think Qt Charts is getting development, so unlikely to ever support this in the same way

Mark
 

gilles....@gmail.com

unread,
Feb 14, 2026, 1:07:17 PMFeb 14
to golden-cheetah-users
Thanks for answers

Marcen : did you do this using python and plotly ?

marcen

unread,
Feb 14, 2026, 4:25:30 PMFeb 14
to golden-cheetah-users
This is a user chart. The different power zones are calculated using “sapply” and the athlete zones from the athlete settings.

The filter works by assigning data points that are not within the upper or lower limit range to the upper or lower limit.

The first filter retains all data points that are less than or equal to the upper limit and sets the values that are greater than that to the value of the upper limit. That is why there is always a continuous line. The second filter works in the same way for the lower limit.

Then, under “relevant,” there is another query as to whether the zone was also used during the session.

Unfortunately, Fill Curve does not work because it always starts at 0.

The finished version is attached if you want to take a closer look.
Activitie – colored by zone.gchart

marcen

unread,
Feb 14, 2026, 11:03:32 PMFeb 14
to golden-cheetah-users
PS: If you are planning to create a chart with Python and Plotly, this could be a starting point. : https://plotly.com/python/filled-area-plots/

gilles....@gmail.com

unread,
Feb 18, 2026, 4:02:07 PMFeb 18
to golden-cheetah-users
Thank you marcen.

I managed to do it on a User Chart tile, but it is too slow (approx. 5 minutes of computation time spended in QWT rendering for this 5 hours ride)... The rendering time seems to be quadratic.
Capture d'écran 2026-02-18 215723.png

I'll try to do it using plotly in GoldenCheetah_Python_Chart_Wrapper

marcen

unread,
Feb 18, 2026, 6:24:08 PMFeb 18
to golden-cheetah-users

It's a shame that it takes so long to land on your system. I tested it with units over 5 hours. Without precise measurement, the tile chart loads in 4 seconds.

I use a DEV version of GC from 01/29/2026 on Arch Linux.

Activitie – colored by zone - overview tile.gchart

gilles....@gmail.com

unread,
Feb 19, 2026, 4:24:13 AMFeb 19
to golden-cheetah-users
In fact, I filled the curves by adding line segments (see attached .gchart file). 

This makes the graph extremely slow.

I could avoid this using "fill curve" setting with your plots, but curves disappear when I use this setting.
Activitie – colored by zone - overview tile - filled for z1 and z2 - 2.png


Activitie – colored by zone - overview tile - filled for z1 and z2.png

Activity plot colored by power zone-v3.gchart

Ale Martinez

unread,
Feb 19, 2026, 7:43:22 AMFeb 19
to golden-cheetah-users
El jueves, 19 de febrero de 2026 a la(s) 4:24:13 a.m. UTC-5, gilles....@gmail.com escribió:
In fact, I filled the curves by adding line segments (see attached .gchart file). 

This makes the graph extremely slow.

I could avoid this using "fill curve" setting with your plots, but curves disappear when I use this setting.

Try unchecking Fast Graphics, it has issues in some cases.
 
Activitie – colored by zone - overview tile - filled for z1 and z2 - 2.png


Activitie – colored by zone - overview tile - filled for z1 and z2.png

Looking at the code above both init and double traversal are unnecessary, the later can be replaced by using nested conditionals like x < z1low ? z1low : (x > z1high ? z1high : x) in just one traversal. 
Time Axis smoothing setting also can help with performance on long activities.

marcen

unread,
Feb 20, 2026, 7:31:16 AMFeb 20
to golden-cheetah-users
Ale, thank you for the one-liner and the other hint.

Gilles, now I understand what you want to do. I tried it without grinding, which is faster in terms of calculation, but with units up to 3 hours, it doesn't look good visually.
I think it's better to use Python or R.
The revised version is attached.
Activitie – colored by zone - with zig-zag.gchart

gilles....@gmail.com

unread,
Feb 20, 2026, 4:11:57 PMFeb 20
to golden-cheetah-users
Thank you !

I modified a bit your code by adding a formula for calculating "zigzag_count",
chartWidth <- 1200; # approximation of the max width (pixels)
spacing <- round(length(samples(SECS)) / chartWidth );
zigzagCount <- (spacing>0) ?spacing:1;

and I removed the lowering to zLow as the curves are now filled and lower zone curves hide upper ones.

The X (time) axis must not be smoothed.

It is quite fast now.

{

init {

zone <- 1;

chartWidth <- 1200; # approximation of the max width (pixels)

spacing <- round(length(samples(SECS)) / chartWidth );

zigzagCount <- (spacing>0)?spacing:1;

}


relevant {

Data contains "P";

zones(power,time)[zone-1]>0;

}

finalise{

zLow <- zones(power,low)[zone-1];

zHigh <- zones(power,high)[zone-1];

fullActivitiePower <- samples(POWER);

yy <- sapply(fullActivitiePower, {x > zHigh ? zHigh : x;});


xx <- samples(SECS);

n <- length(xx);

numericalSeries <- seq(0, n - 1, zigzagCount);

idx <- match(numericalSeries, xx);

insert <- rep(0, length(idx));

yy[idx] <- insert;

}


x { xx; }

y { yy; }

}


A.png


Overview.png

Reply all
Reply to author
Forward
0 new messages