component/UIChartController.js
/* 
    Update chart based on the selected active view
*/
Update chart based on the selected active view
Update chart based on the selected active view
async function updateChart() {
    let data = await prepareGraphData(_host.sessions);
    _chart.data.datasets[0].data = data.y;
    _chart.data.datasets[1].data = data.yLimit;
    _chart.data.datasets[2].data = data.yCompare;
    _chart.data.datasets[2].label = getComparisionLabel(_nDays);
    _chart.data.labels = data.x;
    _chart.options = defaultChartOptions;
    _chart.update();
    updateSubtitle(data);
    updateChartSubtitle();
}
async function updateChart ( ) { let data = await prepareGraphData ( _host . sessions ) ; _chart . data . datasets [ 0 ] . data = data . y ; _chart . data . datasets [ 1 ] . data = data . yLimit ; _chart . data . datasets [ 2 ] . data = data . yCompare ; _chart . data . datasets [ 2 ] . label = getComparisionLabel ( _nDays ) ; _chart . data . labels = data . x ; _chart . options = defaultChartOptions ; _chart . update ( ) ; updateSubtitle ( data ) ; updateChartSubtitle ( ) ; }
Update chart based on the selected active view
Update chart based on the selected active view