Datafield: Heart Rate Zones Chart

Hello all,

this is the suport-thread for the datafield "Heart Rate Zones Chart".

Here you can find the Datafield:
https://apps.garmin.com/de-DE/apps/4...0-c69f911780d6

Feel free to write if you have questions or suggestions (english or german).
Please consider that it was created for my personal use. But with the user configuration via GCM or GE I can share it for everyone who is interested in.

--------------
Overview
--------------
This datafield provides a graph showing the percentage of time spend in the defined HR-zones.
The bars grow depending on the time you spend in the HR-zone during the activity.
It is designed for use in every screen-layout and field size, keeping the default textsize and style, but showing more information about heart rate in a single field.
User configuration is supported for definition of user-depending HR-zones and options.

----------
Details
----------
...are described in the app shop page:
https://apps.garmin.com/de-DE/apps/4...0-c69f911780d6

------------------
Screenshots
------------------






------------------------------------------------------------------------------------------------------------------------------
Version info is included and updated in this post because of limitation of app description
-------------------------------------------------------------------------------------------------------------------------------

------------------------
History - English
------------------------

Version 1.4.1
- updated SDK-version for support of new devices (e.g. Edge 1030)

Version 1.4.0
- updated SDK-version for support of new devices (e.g. fenix 5)
- optimized recognition of timer stated (started/paused).

Version 1.3.2 - 28.06.2016
- corrected descriptions of app settings

Version 1.3.1 - 27.06.2016
- Initialize the datafield after starting an new activity (after anding a previous activity) on Edge devices

Version 1.3.0 - 23.06.2016
- The Datafield supports calculating HR-% based on HR.Max, HR-Rest or LTHR
HR-Max: HR-% is calculated for the range 0 to HR-Max (MR-Max is read from App-Settings/Zones or from user profile)
HR-Rest: HR% is calculated for the range HR-Rest to HR-Max (e.g. 50=0%...180=100% if you set 50 as HR-Rest in App settings)
LTHR: HR% is calculated for the range 0 to LTHR (0=0%, 160=100%, 180=112% if you set 160 as LTHR in App settings)

Version 1.2 - 18.05.2016
- The datafield supports now reading of HR zones from user profile.
If the device-API supports the access-funtions, the datafield uses the HR-zones. Nearly evera device with SDK-version 1.2.6 should be ready for this.
The app settings for HR zones are still present (for compatibility with devices which don't support reading uer profile yet).
With the settings parameter you can switch back to the app settings. So you can still define independent HR zones only for the datafield.
The Zones are read depending on the current sport type. If no zones are defined for the sport type, the default zones are used.

Version 1.1.5c - 16.05.2016
- added support for forerunner FR735XT

Version 1.1.5b - 02.05.2016
- re-added support for Edge 520 & 1000
The app settings should work now with latest Edge firmware

Version 1.1.5a - 01.04.2016
- temporarily stopped support for Edge 520 & 1000
Reason: The Edge-firmware has a bug in app setting handling. The settings are not stored to the device so changes will not take effect
The Edge will be supported if the firmware is updated.

Version 1.1.5 - 23.03.2016
- technical update
- code optimization to reduce memory consumption
- added some new devices

Version 1.1.4 - 15.02.2016
- optimization of text position (centered text)
- optimization of text position for datafield in corner position e.g. on fenix 3 (shifted to non-obscured side)
- changes of style (chart design, text) in ConnectMobile takes effect in running activity

Version 1.1.3 - 11.02.2016
- optimization of text position (more centered)
- optimization of chart drawing performance

Version 1.1.2 - 10.02.2016
- Time in Zones is now only counted if application is active and started

Version 1.1.0 - 10.02.2016
- New settings for chart design:
- thin lines with wide gap (default)
- thin lines with small gap
- bold lines
- solid color. The non-colored HR-value would be easier to read using solid chart color.
- New setting for text size.
- default: same textsize as Garmin-Fields
- dynamic: bigger textsize on bigger fieldsize (e.g. single field, 2 fields). Possible textsize depends on device system fonts.
Details: https://forums.garmin.com/showthread...517#post803517

Version 1.0.0 - 21.12.2015
- initial version


--------------------------
Historie - Deutsch
--------------------------
Version 1.4.1
- Aktualisierung der SDK-Version fpr Kompatibilität mit neuen Ger?ten (z.B. Edge 1030)

Version 1.4.0
- Aktualisierung der SDK-Version fpr Kompatibilität mit neuen Ger?ten (z.B. fenix 5)
- Optimierung der Status-Erkennung (gestartet/pausiert)

Version 1.3.2 - 28.06.2016
- Beschreibungen in den App-Einstellungen korrigiert

Version 1.3.1 - 27.06.2016
- Datenfeld initialisieren beim Start einer neuen Aktivität (nach Beenden einer vorherigen Aktivität) auf Edge-Geräten

Version 1.3.0 - 23.06.2016
- Das Datafield berechnet HR-% basierend auf HR.Max, HR-Rest oder LTHR
HR-Max: HR-% wird berechnet für den Bereich 0 bis HR-Max (HR-Max wird aus den Zonen-Definitionen des Benutzerprofil oder der App-Einstellungen gelesen)
HR-Rest: HR% wird berechnet für den Bereich HR-Rest (Ruhepuls) bis HR-Max (50=0%...180=100% wenn 50 als HR-Rest in den App-Einstellungen angegeben ist)
LTHR: HR% wird berechnet für den Bereich 0 bis LTHR (0=0%, 160=100%, 180=112% wenn 160 als LTHR in den App-Einstellungen angegeben ist)

Version 1.2 - 18.05.2016
- Das Datenfeld verwendet nun die HR-Zonen des Benutzer-Profils.
Wenn das verwendete Gerät den Zugriff auf die Benutzerprofil-Zonen unterstützt, werden diese standardmäßig verwendet.
Dabei werden die Zonen abhängig von der aktuellen Sportart gelesen. Sind zur Sportart keine Zonen definiert, dann werden die Standard-Zonen verwendet.
Die Zonen-Einstellungen in den App-Einstellungen sind noch vorhanden (zur Kompatibilität für Geräte, die das Lesen des Benutzerprofils noch nicht unterstützen).
Mit dem entsprechenden Parameter kann zur Verwendung der App-Einstellungen zurückgewechselt werden. So können z.B. abweichende Zonen speziell für das Datenfeld definiert werden.

Version 1.1.5c - 16.05.2016
- Support für Forerunner FR735XT

Version 1.1.5b - 02.05.2016
- Support for Edge 520 & 1000 wieder aktiviert
Die Epp-Einstellungen sollten mit der aktuellen Edge-Firmware wieder funktionieren

Version 1.1.5a - 01.04.2016
- Support für Edge 520 & 1000 wurde vorübergehend deaktiviert
Grund: Die Edge-Firmware verursacht Fehler beim Speichern der App-Einstellungen. Damit ist es nicht möglich, die Einstellungen des Dtaenfeldes anzupassen.
Die Edge-Unterstützung wird nach einer Firmwarekorrektur seitens Garmin wieder aktiviert.

Version 1.1.5 - 23.03.2016
- Technisches Update
- Code-Optimierung und Reduzierung des Speicherverbrauches
- Neue Geräte ergänzt

Version 1.1.4-15.02.2016
- Textposition angepasst (zentriert)
- Textposition aggepasst für Datenfeld-Position in einer Ecke (bei fenix 3). Der Text wird in Richtung Mitte verschoben.
- Änderungen am Layout in ConnectMobile werden auch in einer laufenden Aktivität übernommen.

Version 1.1.3-11.02.2016
- Text-Position angepasst
- Performanceverbesserungen

Version 1.1.2-10.02.2016
- Zeit in Zonen wird nur während einer gestarteten Aktivität summiert

Version 1.1.0-10.02.2016
- Neue Option zur Wahl eines Diagramm-Designs_
- dünne Linien mit großem Abstand
- dünne Linien mit kleinem Abstand
- breite Linien
- ausgefüllt
- Neue Option zum Einstellen der Textgröße (abhängig von verfügbaren Geräte-Schriften)
Details: https://forums.garmin.com/showthread...517#post803517

Version 1.0.0-21.12.2015
- Initiale Version
  • Stronger colors & fonts?

    Hi,

    I was wondering if it would be possible to use stronger colors for the bars as they grow, and bigger, bolder fonts for the HR & HRZ numbers?

    I use this data field a lot while running at night, and I put it in half screen mode so that I can also see 2 other data fields related to my running. I can see my HRZ no problem with the marker, but the horizontal lines showing the time in each zone are a little weak to see at night. Could these be intensified at all, or at least an option to intensify them?

    Also, I would love for the font displaying the HR & HRZ to be a touch bigger and maybe emboldened a bit, so that it would be super easy to read while running. At least in half screen & full screen mode?

    This is by far my favorite HR–related data field, thank you so much for developing this!

    Harborman
  • Hello Harborman,

    thank you for your comment. I'm glad to see that this datafield seem to be useful and favored ;)
    Also thanks for the five stars!

    I also uses the field in the dark. So I can agree that the color (especially with black background) is little bit too dark and only good visible with light. Streetlights are not bright enough.
    I try to get a better contrast. Perhaps with 2-pixel-lines. Not all colors have dark and light variation to choose one on black and another on white background.
    The textsize is the same like in Garmin-fields - to use same style and match to other fields. I'll check some textsizes/fontwidth. But I have to keep the text inside the field, also in small fieldsize.

    I have to experiment with it... If I have found a possible solution I can send you some pictures and you can give me your feedback.
    Then I can update the app and provide a user options.

    Thank you for using the datafield and your feedback.

    Ronny
  • New settings for chart design and textsize

    Here comes the update to version 1.1.0.
    The datafield offers settings for chart design and textsize.

    - New settings for chart design:
    - thin lines with wide gap (default)
    - thin lines with small gap
    - bold lines
    - solid color. The non-colored HR-value would be easier to read using solid chart color.
    You can use these setting to choose your favored design. Depensing on the design teh chart appears more transparent or more solid. In the solid variation it could be better to use the HR-value uncolored to get mor contract between background-chart and text.

    - New setting for text size.
    - default: same textsize as Garmin-Fields
    - dynamic: bigger textsize on bigger fieldsize (e.g. single field, 2 fields).
    What textsizes are possible depends on device system fonts. The bold fonts seems to be possible only on fenix 3.

    Please update the datafield using GarminExpress or GarminConnectMobile and check the settings in the datafield settingsmenu inside these apps.

    Here are some pictures with the new layouts:




    Here are different text sizes:

  • Thank you very much

    Want to thank you for the field. I have not used it yet in the activity :-), but I already love it - it looks like it solves exactly what I need, is very nice, and it seems to be built with a great attention to detail.

    But there is one thing I do not understand: why the text is not centered horizontally in the field? I would love it even more if it did ;-).
  • Update: optimizing text position and performance

    Thanks sousekd for the hint on the text position. It was printed centered in program, but it seems garmin takes not the center of a character but instead the border as reference.
    I shiftes the text a bit to get it better centered.

    Example:

    Hint: I have not yet updated the pictures in app description. So please don't be irritated.

    I addition some performance optimizations for chart drawing are included.
  • Text centering

    Thanks for a quick response. Now it looks perfect with 3 characters, but not with 1 or 2 (0, up to 99). Interesting training under 100 BPM would it be :-)). Anyway, you must be doing something advanced there - I thought it is just a matter of Gfx.JUSTIFY_CENTER or something like that...
  • The text was centered with Gfx.TEXT_JUSTIFY_CENTER (already as it was a bit out of center). It's now adjusted for 3 digits which is the most used case.
    I think in training time you won't see 1 or 2 digits so often :)

    Text is depending on device and its fonts and possible textsizes. So perhaps it could be printed not the same style on other devices. It's annoying to fix not working default functionality for every possible case. Perhaps in other fields text is positioned on fix position and it don't shift because of using fix length (using leading zeros to keep numer of digits).
    I'm going to check this (perhaps calculating string size an positioning manually) and fix it in a future version if I found a general solution.
  • version 1.1.4 - optimized text position and direct use of settings

    A small update to version 1.1.4:
    - Textposition is corrected. The text ist printed in center of datafield.
    - For datafields positioned in a corner (obscured on one side and on top/bottom), the text is shifted to the non-obscured side. So it's better to read, also in zone number is added.
    - Changing the app settings in ConnectMobile takes effect directly while the activity is running. Start the activity, change the chart style and save the changed in ConnectMobile and you will see the changes directly on the watch.





    Thanks sousekd for your hits on textposition. I had a mistake in positioning of text. The centering works well if the correct center position us used. After several changes in calculating layout the wrong position was used. My fault :o
    Now the text is centered by Gfx.TEXT_JUSTIFY_CENTER in correct way. But it seems that calculating textlength in pixel uses same length for every digit (fixed font). So if left digit is "1" the text seems beeing out of center, but the center digit is centered correctly.
  • Looks cool. Will test it on Epix today :) Default settings for now (of course with own zones ;) )
  • A small update to version 1.1.4:
    - Textposition is corrected. The text ist printed in center of datafield.


    Beautiful. Thank you :-). Now something to keep you busy:

    - allow us to set it to display %HRmax or %HRR (I believe %HRmax is implemented, I am more interested in %HR reserve)
    - to make zones setup easier but keep flexibility, allow us to define them by BPM (as currently), %HRmax, or %HRR

    What I would do is add another optional field to the settings (HRrest), and another dropdown to choose the format of zones setup (BPM, %HRmax, %HRR). Not sure how to handle situation when HRrest is not entered and %HRR dropdown item is selected, but you'll figure something out :-).

    Again, great work. Love it.