Changeset 4bab6c1 in OpenWorkouts-current for ow/static/js/ow.js


Ignore:
Timestamp:
Jan 29, 2019, 12:02:12 PM (5 years ago)
Author:
borja <borja@…>
Branches:
current, feature/docs, master
Children:
bed4f06
Parents:
7783f97
Message:

Use the chart_selector variable when looking for the element where the week chart

will be rendered (instead of the hardcoded "svg")

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ow/static/js/ow.js

    r7783f97 r4bab6c1  
    3131    var openstreetmap_attr = 'Map data &copy; <a href="http://www.osm.org">OpenStreetMap</a>';
    3232
    33     // Some constants reused through the code
     33    // Some vars reused through the code
    3434    var map;
    3535    var gpx;
     
    147147           Build a d3 bar chart, populated with data from the given url.
    148148         */
    149         var chart = d3.select("svg"),
     149        var chart = d3.select(chart_selector),
    150150            margin = {top: 20, right: 20, bottom: 30, left: 50},
    151151            width = +chart.attr("width") - margin.left - margin.right,
Note: See TracChangeset for help on using the changeset viewer.