'Handle AJAX calls directed to this input
Args:
- dispatch (str) - indicates how we want this ajax call to be handled
- data (dict) - dictionary of key-value pairs that contain useful data
Returns:
dict - \'success\' - whether or not we successfully queued this submission
- \'message\' - message to be rendered in case of error'

def handle_ajax(self, dispatch, data):

    if (dispatch == 'plot'):
        return self._plot_data(data)
    return {}
