sandbox/sandbox.js
function getCurrentType() {
    let currentType = storage.getDataByKey(savedChartTypeKey);

    if (!currentType) {
        currentType = charts[0];
        storage.setDataByKey(savedChartTypeKey, currentType);
    }

    return currentType;
}
function getCurrentType() {
    let currentType = storage.getDataByKey(savedChartTypeKey);

    if (!currentType) {
        currentType = charts[0];
        storage.setDataByKey(savedChartTypeKey, currentType);
    }

    return currentType;
}
function getCurrentType ( ) { let currentType = storage . getDataByKey ( savedChartTypeKey ) ; if ( ! currentType ) { currentType = charts [ 0 ] ; storage . setDataByKey ( savedChartTypeKey , currentType ) ; } return currentType ; }
Gets the current chart type either from the store or from the constants file
If no chart type is found in the store, one is set from the constants.
@return {String}     chart type
Gets the current chart type either from the store or from the constants file If no chart type is found in the store one is set from the constants .