Which classes should we use for creating charts?

Former Member
Former Member

The default mountainbike widget features elevation plots for activities. Is there any charting library out there or included within the standard API?

If not what classes are there being used? Are this just lines or polygons with fill?

  • There's no standard class, but it's not hard to do your own.

    Once you have all the values, you just use those along with something like drawLine to draw the bars, maybe using the min and max values to determine the height in pixels.

    Say you have 150 pixels in height to work with and the values are between 30 and 60  and for a value of 45, it would be 75 pixels high.

    something like

    barHeight=maxHeight*(min/max);

  • Former Member
    Former Member in reply to jim_m_58

    Ty - just wanted to make sure that I'm not missing out on something. I will create a "streaming" chart which updates the chart when adding new data points. Maybe I will share that with an open source license.