Changeset bd8eeb4 in OpenWorkouts-current for ow/templates/profile.pt
- Timestamp:
- Jan 29, 2019, 12:35:08 PM (5 years ago)
- Branches:
- current, feature/docs, master
- Children:
- d4cabcc, ed7e9d7
- Parents:
- 6dc1846
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ow/templates/profile.pt
r6dc1846 rbd8eeb4 81 81 </div> 82 82 83 <div class="month-stats js-month-stats"> 84 <svg width="600" height="300"></svg> 85 <div class="filters js-filters"> 86 <a href="#" class="js-distance" i18n:translate="">distance</a> 87 <a href="#" class="js-time" i18n:translate="">time</a> 88 <a href="#" class="js-elevation" i18n:translate="">elevation</a> 89 </div> 90 </div> 91 83 92 </div> 84 93 85 94 </metal:content> 86 95 96 <metal:body-js metal:fill-slot="body-js"> 97 98 <script src="${request.static_url('ow:static/components/d3/d3.min.js')}"></script> 99 <script src="${request.static_url('ow:static/js/ow.js')}"></script> 100 101 <script type="text/javascript"> 102 var y_axis_labels = { 103 "distance": "Kilometers", 104 "time": "Hours", 105 "elevation": "Meters" 106 }; 107 108 var year_chart = owjs.year_chart({ 109 chart_selector: 'div.js-month-stats svg', 110 filters_selector: 'div.js-month-stats div.js-filters a', 111 url: "${request.resource_url(context, 'yearly')}", 112 current_month: "${current_month}", 113 y_axis_labels: y_axis_labels, 114 }); 115 year_chart.render("distance"); 116 year_chart.filters_setup(); 117 </script> 118 119 </metal:body-js> 120 87 121 </html>
Note: See TracChangeset
for help on using the changeset viewer.