component/UIChartController.js
/* 
    Update the subtitle based on active view and number of days. 
*/
Update the subtitle based on active view and number of days.
Update the subtitle based on active view and number of days .
async function updateSubtitle(data) {
    let tot = data.y.reduce((accumulator, entry) => accumulator + entry, 0);
    let average = Math.round(tot / _nDays);
    let msg = "";
    if (_nDays === 1) {
        msg = "You spent a total of <strong>" + tot + " minutes</strong> on this webpage today.";
    } else {
        msg = "On average you spent <strong>" + average + " minutes/day</strong> on this webpage during the last " + _nDays + " days.";
    }
    UISubtitle.innerHTML = msg;
}
async function updateSubtitle ( data ) { let tot = data . y . reduce ( ( accumulator , entry ) => accumulator + entry , 0 ) ; let average = Math . round ( tot / _nDays ) ; let msg = "" ; if ( _nDays === 1 ) { msg = "You spent a total of <strong>" + tot + " minutes</strong> on this webpage today." ; } else { msg = "On average you spent <strong>" + average + " minutes/day</strong> on this webpage during the last " + _nDays + " days." ; } UISubtitle . innerHTML = msg ; }
Update the subtitle based on active view and number of days.
Update the subtitle based on active view and number of days .