User Tile color option

234 views
Skip to first unread message

Gerrie Delport

unread,
Sep 28, 2021, 3:44:08 PM9/28/21
to golden-cheetah-users
I am building a summary Chart like we had before. 

One more thing I am looking for is how to change the color of text if it meat a set rule.
Like if the date is today then it will change to green. 
(I changed it in paint)

userchart color.jpg

Ale Martinez

unread,
Sep 28, 2021, 4:25:53 PM9/28/21
to golden-cheetah-users
In current master Mark has added a heat function to color column values in a range, but I doesn't look it can be used for that application.

Ale Martinez

unread,
Sep 29, 2021, 10:23:10 AM9/29/21
to golden-cheetah-users
El martes, 28 de septiembre de 2021 a la(s) 17:25:53 UTC-3, Ale Martinez escribió:
In current master Mark has added a heat function to color column values in a range, but I doesn't look it can be used for that application.

I thought about this in my morning run and there is a fairly trivial way to use the heat function for this use case: you need to build a vector with zeroes for all activities and a number in (0, 1] when Date=Today, then use it as heat for all columns if you want the whole row colored. The number will determine the color with 1 being red. 

Gerrie Delport

unread,
Sep 29, 2021, 11:18:33 AM9/29/21
to Ale Martinez, golden-cheetah-users
This is why I like using GC. 

The things we think about while training. 

I am excited to play with this. My programming is limited but this is such good practice and I am having fun figuring it out. 

If you have an example of using the heat it would be nice if you can share that. 

- Gerrie 

--
_______________________________________________
Golden-Cheetah-Users mailing list
golden-che...@googlegroups.com
http://groups.google.com/group/golden-cheetah-users?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "golden-cheetah-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golden-cheetah-users/xH6cgsIJgoM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golden-cheetah-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golden-cheetah-users/12a1aa26-e9e8-459e-aba0-a8ac0e5ed161n%40googlegroups.com.


--
Gerrie Delport
Cell: +1 (860) 856-0229

Ale Martinez

unread,
Sep 29, 2021, 11:42:04 AM9/29/21
to golden-cheetah-users
El miércoles, 29 de septiembre de 2021 a la(s) 12:18:33 UTC-3, Gerrie Delport escribió:
This is why I like using GC. 

The things we think about while training. 

I am excited to play with this. My programming is limited but this is such good practice and I am having fun figuring it out. 

If you have an example of using the heat it would be nice if you can share that. 

When you install a version with this feature, both Intervals and Activities legacy options for the Table tile include heat map examples. 

Gerrie Delport

unread,
Sep 30, 2021, 1:56:48 PM9/30/21
to Ale Martinez, golden-cheetah-users
Thanks for the help Ale. 

I feel bad asking all these questions. 

But I don't know what you mean by "install a version with this feature, both Intervals and Activities legacy options for the Table tile include heat map examples"

Sorry :(

--
_______________________________________________
Golden-Cheetah-Users mailing list
golden-che...@googlegroups.com
http://groups.google.com/group/golden-cheetah-users?hl=en
---
You received this message because you are subscribed to the Google Groups "golden-cheetah-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golden-cheetah-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golden-cheetah-users/f108410b-42a0-4b50-951b-5167805f2468n%40googlegroups.com.

Ale Martinez

unread,
Sep 30, 2021, 4:39:52 PM9/30/21
to golden-cheetah-users
El jueves, 30 de septiembre de 2021 a la(s) 14:56:48 UTC-3, Gerrie Delport escribió:
Thanks for the help Ale. 

I feel bad asking all these questions. 

But I don't know what you mean by "install a version with this feature, both Intervals and Activities legacy options for the Table tile include heat map examples"

Using current master:

heatmap.PNG 

Gerrie Delport

unread,
Oct 1, 2021, 9:57:13 AM10/1/21
to golden-cheetah-users
I am sure you are going to ban me soon.... LOL

This is what I see. Capture.JPG

Capture.JPG

Ale Martinez

unread,
Oct 1, 2021, 10:01:30 AM10/1/21
to golden-cheetah-users
El viernes, 1 de octubre de 2021 a la(s) 10:57:13 UTC-3, Gerrie Delport escribió:
I am sure you are going to ban me soon.... LOL

Gerrie Delport

unread,
Oct 15, 2021, 2:49:29 PM10/15/21
to golden-cheetah-users
I found the heat function it was in the October 9 release, so if you want to di this you need to be on the latest snapshot build.

If someone would like to do the same I attached the code at the bottom. 


60minpower.JPG

{

# column names, if using metrics then best

# to use metricname() to get correct name for locale

# otherwise it won't translate to other languages

names {

metricname(date,

60_min_Peak_Power);

}


# column units, if using metrics then best

# to use metricunit() function to get correct string

# for locale and metric/imperial

units {

metricunit(date,

60_min_Peak_Power);

}


# values to display as doubles or strings

# if using metrics always best to use asstring()

# to convert correctly with dp, metric/imperial

# or specific formats eg. rowing pace xx/500m

values {

a<-c(metricstrings(60_min_Peak_Power));

b<-c(metricstrings(date));


d <- sapply(b, {b[i]= datestring(Today) ? 2:0;});


top5 <- head(argsort(descend, a),5);


# only want the Top 5 values

min5 <- a[top5];

Date5 <- b[top5];

Zdate <- head(d[top5],5);

c(Date5,min5);

}


# Heat Map

heat {

c(normalize(0,10,Zdate),

normalize(0,10,Zdate));

}

# Click thru for the row, we can set the file

# this row represents. In the same way as a user chart.

f {

filename();

}

}

TJDunnigan

unread,
Dec 20, 2021, 11:04:46 AM12/20/21
to golden-cheetah-users
Hi Gerrie,

Thanks for the code! I've implemented it into my Trends Overview as 10 best powers.

The other day, however, I had this spurious result following a recovery trainer session - the best one hour power is reported as 99 watts (second best is 225 watts).

I looked over the code (minimal code knowledge) and don't see why this would occur.

Any ideas?
Screen Shot 2021-12-20 at 8.02.07 AM.png

Gerrie Delport

unread,
Dec 20, 2021, 11:23:10 AM12/20/21
to TJDunnigan, golden-cheetah-users
Hi TJDunnigan

I have seen that and don't know why that happened. My "Fix: was to add a filter. Maybe some of the clever guys can help.

My filter look like this "(isRun=0) and (isSwim=0) and 60_min_Peak_Power > 100"

image.png



--
_______________________________________________
Golden-Cheetah-Users mailing list
golden-che...@googlegroups.com
http://groups.google.com/group/golden-cheetah-users?hl=en
---
You received this message because you are subscribed to the Google Groups "golden-cheetah-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golden-cheetah-u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages