sandbox/sandbox.js
function _handleDataUpdate() {
    const rawData = dataEditor.getValue();
    let freshData = null;

    try {
        freshData = evalDataString(rawData);
    } catch(e) {
        errors.push(new Error('Could not parse the data from the input field', rawData));
    }

    storage.setDataByKey(savedDataKey, freshData);

    if (freshData) {
        setNewChart();
    }
}
function _handleDataUpdate() {
    const rawData = dataEditor.getValue();
    let freshData = null;

    try {
        freshData = evalDataString(rawData);
    } catch(e) {
        errors.push(new Error('Could not parse the data from the input field', rawData));
    }

    storage.setDataByKey(savedDataKey, freshData);

    if (freshData) {
        setNewChart();
    }
}
function _handleDataUpdate ( ) { const rawData = dataEditor . getValue ( ) ; let freshData = null ; try { freshData = evalDataString ( rawData ) ; } catch ( e ) { errors . push ( new Error ( 'Could not parse the data from the input field' , rawData ) ) ; } storage . setDataByKey ( savedDataKey , freshData ) ; if ( freshData ) { setNewChart ( ) ; } }
Updates the data for the chart on the store, then sets a new chart so the new data is displayed
@return {[type]} [description]
Updates the data for the chart on the store then sets a new chart so the new data is displayed