Data fields: Charts (Pace, heart rate, etc)



https://apps.garmin.com/en-GB/apps/869a88b7-37b0-4c34-b8b7-c9bfd01d47d1 (Pace)
https://apps.garmin.com/en-GB/apps/dc4c99a1-0886-42f5-8605-f952956e715b (Heart rate)
https://apps.garmin.com/en-US/apps/14bf2d0b-7f08-40bb-b315-3ff33ce2b734 (Speed)
https://apps.garmin.com/en-US/apps/815881f2-dc56-4f11-a5cd-117f11b80bcf (Cadence)
https://apps.garmin.com/en-US/apps/bb752d7d-759f-4646-893a-52ec7d6fb7af (Power)
https://apps.garmin.com/en-US/apps/0bbabaa9-aedf-44e8-913b-60e4198be083 (Elevation)

Well, I have a chart class, I might as well use it to the max, right? So here we have some data fields.

Changelog:

1.3 - Variable durations, flip pace chart to match Garmin Connect, add power
1.2 - Increase durations, increase font size for long thin layouts, try to clip spikes in pace/speed
1.1 - Rework smaller layouts for better legibility, add speed, cadence and elevation
1.0 - Initial version (HR / pace)
  • So I'd definitely be interested in feedback here:

    What other data fields should I produce? I'm guessing that speed and elevation are obvious candidates, any others?

    Are you more interested in using them full screen or with more than one field in a layout?

    The data fields copy the previous widget/app layout when used "full screen" but then switch to superimposing current/min/max over the top of the chart when they have to share the screen, since that uses less space. I'm not sure that the minimum and maximum are as clear as they could be in that case, but I tried them float over the chart as they do in full screen mode and they just got in the way...
  • I'd like to see one for heart rate zones.
  • Great idea, but I would like to see the fields without the current value superimposed in order to see more of the graph.
    I could see myself using these fields in the middle field of a three field layout, and have the current HR/Pace value as a regular field above or below.
    Min/max could be placed on one of the sides on the Y-axis to make the graph even clearer.

    -Torstein
  • Cadence, of course. An obvious choice for cyclists...

    Very nice data field! Thank you!
  • This looks GREAT!! (with the exception that only 2 CIQ Datafield can be used)
  • Tried it this morn.
    Just some thots - not negative feedback or such
    1) 3 fields layout - the numbers crowd the graph. The tiny font for pace min/max over past 5min hardly legible when running
    2) 2 fields layout - not too bad. Much better than 3 fields horizontal (as opposed to 1 top, 2 bottom - 3 fields layout)

    I think this would be grEat on single field layout like the HR Chart widget (I think u wrote that as well)

    May I ask a few question - hope u oblige (since u publish the source code as I want to learn)
    1) how do u get the currentPace? The API Does not expose that (simulator gives me error). And I see u use currentSpeed instead. Garmin does the auto translation based on system settings?

    2) u don't use eclipse as your development? I keep trying to import it into eclipse but not successful. I want to play around w the code to learn how to implement my own data field (currently doing the simpledatafield example and with 3 fields - dist/cadence/hr the numbers are small.... I'm told I need to use the ui..datafield and do everything myself. (I can live with that provided I can see how to do it.)

    Current one in the garmin store (run field) is more suited for 920xt and is too big for the fenix3 which I have.

    Thanks !!
  • Tried it this morn.
    Just some thots - not negative feedback or such
    1) 3 fields layout - the numbers crowd the graph. The tiny font for pace min/max over past 5min hardly legible when running
    2) 2 fields layout - not too bad. Much better than 3 fields horizontal (as opposed to 1 top, 2 bottom - 3 fields layout)


    Yeah, I'm really struggling to figure out how to show all that data in a small space. I'm thinking of moving the current value to the side of the graph for the long thin layouts.

    I think this would be grEat on single field layout like the HR Chart widget (I think u wrote that as well)


    Yes, I did. And that already works, just select the 1 field layout.

    May I ask a few question - hope u oblige (since u publish the source code as I want to learn)
    1) how do u get the currentPace? The API Does not expose that (simulator gives me error). And I see u use currentSpeed instead. Garmin does the auto translation based on system settings?


    Yeah, the API only exposes speed, not pace. But pace is just the inverse of speed - so the division in this line: https://github.com/simonmacmullen/chart-datafields/blob/master/modes/mode-pace.mc#L25 converts to pace (internally represented as seconds-per-km/mile, not minutes since integers seem to be more memory efficient. fmt_num() then converts to minutes-per-km/mile.

    2) u don't use eclipse as your development? I keep trying to import it into eclipse but not successful. I want to play around w the code to learn how to implement my own data field (currently doing the simpledatafield example and with 3 fields - dist/cadence/hr the numbers are small.... I'm told I need to use the ui..datafield and do everything myself. (I can live with that provided I can see how to do it.)


    No, I don't use Eclipse, just old skool Emacs. I'm not sure what Eclipse assumes about layout - maybe you need to rename one of the manifests to "manifest.xml", and rename "src" to "source"?

    This is perhaps a bit of a verbose example to learn from since the update method is quite large, but see https://github.com/simonmacmullen/chart-datafields/blob/master/src/ChartDataField.mc#L32 for the layout / drawing code.
  • New version uploaded, which I think is rather more legible.

    I've given up on trying to show the current value at all for the very tiny 1/4 layouts, I just don't think it's practical.

    Also, I've created speed, cadence and elevation versions which are currently awaiting approval.
  • I'd like to see one for heart rate zones.


    I will look into this, but it would be a bit ugly. As far as I can see, the APIs only let us get the user's resting heart rate, and really we need their maximum rate to calculate zones. But we could just hard code 190bpm I suppose.
  • Is this better? :-) https://apps.garmin.com/en-US/apps/0bbabaa9-aedf-44e8-913b-60e4198be083


    That looks cool, but why do you display only the last 10 min? Is it possible to show more, like the last 1 or 2 hours?

    Can you show the elevation since the start of a Activity or can this not be done with the SDK?