How to display distance in Km or Miles in Garmin Connect?

Hello,I've written a simple Datafield that saves a distance with the FitContributor module in Garmin Connect, but the problem is that distance can be in Km or Miles.

I can retrieve the user distance setting from the watch,but how can change the unit displayed in Garmin Connect accordingly?

I don't know how to say to Garmin Connect use the string "Km" or "Mile".

Thanks for any suggestion.

  • Maybe you can define two field id's in the resource file. One for km and one for mile. Give the FitContributor  the ID corresponding km or mile depending on the user distance setting.

    <resources>
        <fitContributions>
            <fitField id="0" displayInChart="true" sortOrder="0" precision="1" chartTitle="@Strings.id_DistLabel" dataLabel="@Strings.id_DistLabel" unitLabel="@Strings.id_Miles" fillColor="#FF00FF"/>
            <fitField id="1" displayInChart="true" sortOrder="0" precision="1" chartTitle="@Strings.id_DistLabel" dataLabel="@Strings.id_DistLabel" unitLabel="@Strings.id_kms" fillColor="#FF00FF"/>
        </fitContributions>    
    </resources>

  • Good idea!!!...Thanks I'll try

  • In GC select

    Account Settings > Display Preferences > Metric/Statute/Statute UK

    I think it's not possible to have different units on  GC and the watch, because the watch usually synced the units from GC.

  • Are the labels for the abscissa or ordinate?

  • The unit label is for the ordinate (y-axis) and represent the unit of measure (e.g. "bpm").

    The data label is the title of the chart itself (e.g. "Heart Rate"), and represents the quantity being measured.

    In practice they're displayed as follows:

    - In Garmin Connect Mobile (phone app): in the graph title (e.g. "Heart Rate (bpm)". Here, the x-axis is always time.

    - In Garmin Connect web: when you hover over (or tap) a point on the graph (which displays the value at the point, and the unit of measure). Here, the x-axis defaults to time, but can be changed to distance.

    The idea here is that FITContributor graph labels cannot be changed at run time (they're part of the resource manifest that gets uploaded to the store), so you have to define two fields (with fixed labels) and choose the one you write to at run time.

  • Thank you, I've got it.

    The chart depicts (y = distance [mi or km]) vs (x = time or distance).